Changeset 813a703 in mainline for uspace/lib/libc/generic/time.c
- Timestamp:
- 2007-10-03T06:37:02Z (17 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 40676a2
- Parents:
- 4d61252
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/libc/generic/time.c
r4d61252 r813a703 149 149 _exit(1); 150 150 } 151 if (! 151 if (!(rights & AS_AREA_READ)) { 152 152 printf("Received bad rights on time area: %X\n", 153 153 rights); 154 154 as_area_destroy(mapping); 155 155 _exit(1); … … 176 176 } 177 177 178 time_t time(time_t *tloc) 179 { 180 struct timeval tv; 181 182 if (gettimeofday(&tv, NULL)) 183 return (time_t) -1; 184 if (tloc) 185 *tloc = tv.tv_sec; 186 return tv.tv_sec; 187 } 188 178 189 /** Wait unconditionally for specified number of microseconds */ 179 190 void usleep(unsigned long usec)
Note:
See TracChangeset
for help on using the changeset viewer.