gettimeofday wince - Windows CE

This is a discussion on gettimeofday wince - Windows CE ; Hi, I am new to windows ce. i searched for gettimeofday function which uses (struct timeval). i know that function is not there in wince. can anyone provide me pointers on how i could get that function in win ce. ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: gettimeofday wince

  1. gettimeofday wince

    Hi,
    I am new to windows ce. i searched for gettimeofday function which
    uses (struct timeval).

    i know that function is not there in wince. can anyone provide me
    pointers on how i could get that function in win ce.

    i am a linux programmer and am porting an library to windows ce.

    A code sample will be very helpful.


    thanks,

    regards,
    sriram


  2. Re: gettimeofday wince

    Hi!
    I'd recommend

    SYSTEMTIME tSystemtime;
    ....
    GetLocalTime(&tSystemtime);

    The definition of the SYSTEMTIME structure comes with winbase.h:

    typedef struct _SYSTEMTIME {
    WORD wYear;
    WORD wMonth;
    WORD wDayOfWeek;
    WORD wDay;
    WORD wHour;
    WORD wMinute;
    WORD wSecond;
    WORD wMilliseconds;
    } SYSTEMTIME;

    Greetings,

    Kerstin


    "Ram" wrote in news:1141025039.665377.102260
    @p10g2000cwp.googlegroups.com:

    > Hi,
    > I am new to windows ce. i searched for gettimeofday function which
    > uses (struct timeval).
    >
    > i know that function is not there in wince. can anyone provide me
    > pointers on how i could get that function in win ce.
    >
    > i am a linux programmer and am porting an library to windows ce.
    >
    > A code sample will be very helpful.
    >
    >
    > thanks,
    >
    > regards,
    > sriram
    >
    >



  3. Re: gettimeofday wince

    Note that GetSystemTime() returns Greenwich Mean Time, not the local time of
    the device. If you want local time, use GetLocalTime(), which has the same
    signature as GetSystemTime() but converts for the device time zone before
    returning the information.

    I don't believe that the Windows CE run-time from MS has any support for
    timeval-based time information (the sockets library uses it some, but that's
    it, as far as I can see).

    Paul T.

    "Ram" wrote in message
    news:1141025039.665377.102260@p10g2000cwp.googlegr oups.com...
    > Hi,
    > I am new to windows ce. i searched for gettimeofday function which
    > uses (struct timeval).
    >
    > i know that function is not there in wince. can anyone provide me
    > pointers on how i could get that function in win ce.
    >
    > i am a linux programmer and am porting an library to windows ce.
    >
    > A code sample will be very helpful.
    >
    >
    > thanks,
    >
    > regards,
    > sriram
    >




+ Reply to Thread