/* ftime.c (rsxnt) -- Copyright (c) 1996-1997 Rainer Schnitker */

#include "rsxnt.h"

void __ftime(struct timeb *timeb)
{
    SYSTEMTIME st;
    TIME_ZONE_INFORMATION tz;

    GetLocalTime(&st);

    timeb->time = _rsxnt_st2gmt(&st);
    timeb->millitm = st.wMilliseconds;
    timeb->dstflag = 0;

    if (GetTimeZoneInformation(&tz) != 0xFFFFFFFF)
	timeb->timezone = tz.Bias / 60;
    else
	timeb->timezone = 0;
}
