Toggle navigation
Home
Latest pastes
FAQ
Random
BitBin is shutting down!
Register
Login
GetTime
SUBMITTED BY:
Guest
DATE:
Feb. 12, 2014, 6:44 p.m.
FORMAT:
Text only
SIZE:
432 Bytes
Raw
Download
Tweet
HITS:
1126
Go to comments
Report
unsigned int GetTime()
{
unsigned int value;
struct tm *newtime;
time_t long_time;
time(&long_time);
newtime = localtime(&long_time);
value = ((newtime->tm_sec) % 10)+((newtime->tm_sec) /10)*16
+((((newtime->tm_min) % 10)+((newtime->tm_min) /10)*16) << 8)
+((((newtime->tm_hour) % 10)+((newtime->tm_hour)/10)*16) << 16);
return(value);
}
Please enable JavaScript to view the
comments powered by Disqus.
comments powered by
Disqus