![]() |
Show 150 posts per page |
.dsy:it. (http://www.dsy.it/forum/)
- Tech (http://www.dsy.it/forum/forumdisplay.php?forumid=189)
-- [cultura informatica] Epoch (http://www.dsy.it/forum/showthread.php?threadid=18485)
[cultura informatica] Epoch
perche per windows epoch è il 1601 e per unix il 1970?
se devo convertire l'ephoc di windows in unix
code:
//gettimeofday #include <sys/time.h> #include <windows.h> //prototipo int gettimeofday(struct timeval *tp, void *tzp); int gettimeofday(struct timeval* tp, void* tzp){ union { /*tempo passato dal 1 Gennaio 1601 (in centinaia di nanosec) */ long long ns100; FILETIME ft; } _now; GetSystemTimeAsFileTime( &(_now.ft) ); //microsecondi tp->tv_usec=(long)((_now.ns100 / 10LL) % 1000000LL ); //secondi dal 1 gennaio 1970 tp->tv_sec= (long)((_now.ns100-(116444736000000000LL))/10000000LL); return (0); }
__________________
code:
, , | | Me@Flickr [ov0] | | my photo Blog {| |} |@| Pallavolo La Nuova Rossa Milano --"-"--| | -------| | "If You Can't Open It, You Don't Own It"
uffa , ero curioso....
__________________
code:
, , | | Me@Flickr [ov0] | | my photo Blog {| |} |@| Pallavolo La Nuova Rossa Milano --"-"--| | -------| | "If You Can't Open It, You Don't Own It"
| All times are GMT. The time now is 15:08. | Show all 2 posts from this thread on one page |
Powered by: vBulletin Version 2.3.1
Copyright © Jelsoft Enterprises Limited 2000 - 2002.