Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<time.h>
- #include<stdio.h>
- void main(){
- time_t timehere = time(NULL); //Make time_t var
- struct tm *mytime; //Make pointer to tm struct
- mytime = localtime(&timehere); //mytime pointing to localtime(time_t direction timehere)
- printf("%d:%d:%d",mytime->tm_hour,mytime->tm_min,mytime->tm_sec);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement