ICU-4379 uprv_getUTCtime can now return subsecond precision (at least on Windows for now).
X-SVN-Rev: 17338
This commit is contained in:
parent
3d422a5f99
commit
dcd6895812
@ -246,11 +246,11 @@ uprv_getUTCtime()
|
|||||||
uprv_memcpy( &tmrec, gmtime(&t), sizeof(tmrec) );
|
uprv_memcpy( &tmrec, gmtime(&t), sizeof(tmrec) );
|
||||||
t2 = mktime(&tmrec); /* seconds of current GMT*/
|
t2 = mktime(&tmrec); /* seconds of current GMT*/
|
||||||
return (UDate)(t2 - t1) * U_MILLIS_PER_SECOND; /* GMT (or UTC) in seconds since 1970*/
|
return (UDate)(t2 - t1) * U_MILLIS_PER_SECOND; /* GMT (or UTC) in seconds since 1970*/
|
||||||
/*#elif defined(U_WINDOWS)
|
#elif defined(U_WINDOWS)
|
||||||
|
|
||||||
FileTimeConversion winTime;
|
FileTimeConversion winTime;
|
||||||
GetSystemTimeAsFileTime(&winTime.fileTime);
|
GetSystemTimeAsFileTime(&winTime.fileTime);
|
||||||
return (UDate)((winTime.int64 - EPOCH_BIAS) / HECTONANOSECOND_PER_MILLISECOND);*/
|
return (UDate)((winTime.int64 - EPOCH_BIAS) / HECTONANOSECOND_PER_MILLISECOND);
|
||||||
#else
|
#else
|
||||||
/*
|
/*
|
||||||
struct timeval posixTime;
|
struct timeval posixTime;
|
||||||
|
Loading…
Reference in New Issue
Block a user