sqInt ioSeconds(void)


Parms: NONE
return: seconds
From: Interpreter
Why:
return number of seconds since January 1, 1901 as an integer

Responsibility:
sqInt primitiveSecondsClock(void)

MacIntosh
os-9/OSXCarbon
Uses unix code

Cocoa:
TBD

iPhone
uses unix code

Unix
int ioSeconds(void) {
time_t unixTime;

unixTime = time(0);
unixTime += localtime(&unixTime)->tm_gmtoff;
return unixTime + ((52*365UL + 17*366UL) * 24*60*60UL);
}

Windows
GetLocalTime(&sysTime), then convert to squeak epoch

BUGS
And when do 32bits overflow?

There are no comments on this page.
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki