FTIME.C
Upload User: qq5388545
Upload Date: 2022-07-04
Package Size: 29849k
Code Size: 0k
Category:

GUI Develop

Development Platform:

C/C++

  1. #include <stdio.h>
  2. #include <time.h>
  3. #include <systimeb.h>
  4. void main(void)
  5.  {
  6.    struct timeb timezone;
  7.    tzset();
  8.    ftime(&timezone);
  9.    printf("Seconds since 1 January 1970 (GMT) %ldn",
  10.      timezone.time);
  11.    printf("Fractional seconds %dn", timezone.millitm);
  12.    printf("Hours difference between GMT and local zone %dn",
  13.      timezone.timezone / 60);
  14.    if (timezone.dstflag)
  15.      printf("Daylight savings time activen");
  16.    else
  17.      printf("Daylight savings time inactiven");
  18.  }