what i am looking for must work both on windows and linux..and should conform to ANSI-C89 standard..

1) there are interpreters called spidermonkey (used by Mozilla) and SEE ...these guys have implemented this thing using C and conforming to standards...even though the source is OPEN i am not able to make out how they have done it ..

the interpreters are for JavaScript and they have done the above asked things to implementing Date object for javaScript

2) is there any way i can know how these standard C function (time()) get the system time ..i might be able to do something in that case...because what i know is that the system returns a value with a sub second resolution and this function discards the value and only use the value till the seconds resolution..