Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include <unistd.h>
- #include <time.h>
- int main( void )
- {
- struct timespec stime;
- if( clock_gettime( CLOCK_REALTIME, &stime) == -1 ) {
- perror( "getclock" );
- exit( EXIT_FAILURE );
- }
- stime.tv_sec += (60*60)*24L; /* Add one day */
- stime.tv_nsec = 0;
- if( clock_settime( CLOCK_REALTIME, &stime) == -1 ) {
- perror( "setclock" );
- exit( EXIT_FAILURE );
- }
- return( EXIT_SUCCESS );
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement