12345678910111213141516171819202122232425262728293031323334353637 |
- #include <sys/timeb.h>
- #include <sys/time.h>
- int ftime(struct timeb *timebuf)
- {
- struct timeval tv;
- struct timezone tz;
-
- gettimeofday (&tv, &tz);
- timebuf->time = tv.tv_sec;
- timebuf->millitm = (tv.tv_usec + 999) / 1000;
- timebuf->timezone = tz.tz_minuteswest;
- timebuf->dstflag = tz.tz_dsttime;
- return 0;
- }
|