
Even better, you can use the ANSII-standard LocalTime function, for both Windows and the Mac. Follow these steps:
1. Make a copy of the Clock.c and Clock.k files found in your ...:Key:Runtime:"Folder. Place the copies in your applications "sources" folder.
2. In YourProject.k comment out the line "Clock;" and add "Clock;" to the list of files under "include "SOURCES;";"
3. Modify your copy of Clock.k by adding the following method
GetTimeOfDay() external "ClockGetTimeOfDay";
4. Modify your copy of Clock.c by adding the following function:
void ClockGetTimeOfDay (key* the)
{ time_t now;
struct tm *date;
char *s
now=time(NULL);
date=localtime(&now);
s=osctime(date);
the[RESULT]=keyFromString(s);
}
Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help