Menu

#5 IBPP::Time::Now() can support milliseconds

open
nobody
None
5
2012-10-17
2006-09-18
Ilya_m
No

I am not sure for other platforms, but for MSVC the
code can be modified

.........

include <sys timeb.h="">

.........

void IBPP::Time::Now()
{
_timeb tBuf; _ftime(&tBuf);
tm* loctime = localtime(&tBuf.time);
IBPP::itot(&mTime,
loctime->tm_hour,
loctime->tm_min,
loctime->tm_sec,
tBuf.millitm * 10);
}

.........

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.