Share this page

# Example: ftime

The following example uses ftime to print out some details of the system time.

        #include <stdio.h>

        #include <time.h>
        struct _timeb {
            time_t time;
            unsigned short millitm;
            short timezone;
            short dstflag;
        };

        struct _timeb t;

    // Sets variables used by ftime

        _tzset();
        _ftime( &t );
        lr_message ("Plus milliseconds: %u", t.millitm);
        lr_message ("Timezone difference from UTC: %d secs", t.timezone);
        lr_message ("Daylight savings: %s", t.dstflag ? "YES" : "NO");}

    Example: Output:
    Plus milliseconds: 637
    Timezone difference from UTC: -120 secs
    Daylight savings: NO

Tips to improve your search results... VuGen Function Reference Version 25.1-25.3 Function Reference 25.1-25.3 All View Local Help Center View Online Help Center Version: