Yuan Yijun (bbbush) wrote,
Yuan Yijun
bbbush

timestamp

COleDateTime: 秒级
SYSTEMTIME: 毫秒
FILETIME: 微秒(?)
DosFILETIME(?): 两秒


	inline static CString ShowTimestampPrefix()
	{
		if(!bTimestamp)
			return NULL;

		SYSTEMTIME sysdtNow;
		::GetLocalTime(&sysdtNow);
		COleDateTime dtNow = sysdtNow;
		CString strResult = dtNow.Format(DEFAULT_TIMEFORMAT);
		if(strResult.Find(_T("%_")))
		{
			CString strMillSecond;
			strMillSecond.Format(_T("%03d"), sysdtNow.wMilliseconds);
			strResult.Replace(_T("%_"), strMillSecond);
		}
		return strResult;
	}

Tags: 工作
Subscribe

  • 2020

    Last time I wrote a review was in 2018, about 2017. Or maybe I wrote something elsewhere, maybe on Twitter? It was hard to write something freely…

  • Feedback letter to Peoples Gas[1]

    Credit report dispute. To whom it may concern: I called at around 5pm, and the receptionist cannot figure it out why I had a "late…

  • 循序渐进

    ZR 说,你教小宝滑雪,一定要让他先体会到乐趣,不然他不肯学的。于是他教了小宝很久,果然教会了,小宝玩得特开心。 DL 说,你跑步,一开始不要跑那么快,太累。保持自己的节奏,能一边跑一边说话是最好。跑得太累,以后就不愿意来跑了。 CC…

  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments