Changeset e984c645 in rtems


Ignore:
Timestamp:
Jun 3, 1996, 6:59:59 PM (25 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
fa4fdd7d
Parents:
685f4d6
Message:

added test code for return of remaining time from sleep().

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • c/src/tests/psxtests/psx01/init.c

    r685f4d6 re984c645  
    5252  pthread_t       thread_id;
    5353  time_t          seconds;
     54  time_t          remaining;
    5455  struct tm       tm;
    5556  struct timespec tv;
     
    7576  /* use sleep to delay */
    7677
    77   seconds = sleep( 3 );
    78   assert( !seconds );
     78  remaining = sleep( 3 );
     79  assert( !remaining );
    7980
    8081  /* print new times to make sure it has changed and we can get the realtime */
     
    8788  seconds = time( NULL );
    8889  printf( ctime( &seconds ) );
     90
     91  /* check the time remaining */
     92
     93  printf( "seconds remaining (%d)\n", (int)remaining );
     94  assert( !remaining );
    8995
    9096  /* use nanosleep to delay */
  • testsuites/psxtests/psx01/init.c

    r685f4d6 re984c645  
    5252  pthread_t       thread_id;
    5353  time_t          seconds;
     54  time_t          remaining;
    5455  struct tm       tm;
    5556  struct timespec tv;
     
    7576  /* use sleep to delay */
    7677
    77   seconds = sleep( 3 );
    78   assert( !seconds );
     78  remaining = sleep( 3 );
     79  assert( !remaining );
    7980
    8081  /* print new times to make sure it has changed and we can get the realtime */
     
    8788  seconds = time( NULL );
    8889  printf( ctime( &seconds ) );
     90
     91  /* check the time remaining */
     92
     93  printf( "seconds remaining (%d)\n", (int)remaining );
     94  assert( !remaining );
    8995
    9096  /* use nanosleep to delay */
Note: See TracChangeset for help on using the changeset viewer.