A
Anand CS
Hi All
I have question regarding time data structures...
I have 64 bit unsigned microsecond resolution
(unsigned __int64 for windows/and unsigned long long for others)
variable. It stores the microsoconds elapsed since the Epoch...
I want to convert this time into a string form....
AFAIK normally the procedure from a time_t structure to string format
is something like...convert time_ to struct tm using localtime
method......
as shown below..
time_t result;
result = time(NULL);
printf("%s\n", asctime(localtime(&result)));
But in my case I dont have a time_t structure as shown above but a
unsigned 64 bit value....How do I convert this to a time_t type
(portably) and use the same procedure shown above...
Any suggestions
Thanks
Senthil
I have question regarding time data structures...
I have 64 bit unsigned microsecond resolution
(unsigned __int64 for windows/and unsigned long long for others)
variable. It stores the microsoconds elapsed since the Epoch...
I want to convert this time into a string form....
AFAIK normally the procedure from a time_t structure to string format
is something like...convert time_ to struct tm using localtime
method......
as shown below..
time_t result;
result = time(NULL);
printf("%s\n", asctime(localtime(&result)));
But in my case I dont have a time_t structure as shown above but a
unsigned 64 bit value....How do I convert this to a time_t type
(portably) and use the same procedure shown above...
Any suggestions
Thanks
Senthil