]> gitweb.factorcode.org Git - factor.git/blob - extra/time/windows/windows.factor
Implement set-time on Windows
[factor.git] / extra / time / windows / windows.factor
1 ! Copyright (C) 2010 Doug Coleman.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: calendar.windows system time windows.errors 
4 windows.kernel32 kernel classes.struct calendar ;
5 IN: time.windows
6
7 : windows-system-time ( -- SYSTEMTIME )
8     SYSTEMTIME <struct> [ GetSystemTime ] keep ;
9
10 M: windows set-time
11     >gmt
12     timestamp>SYSTEMTIME SetSystemTime win32-error=0/f ;