Changeset 5fbc1f9 in mainline
- Timestamp:
- 2019-01-10T20:51:25Z (6 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 51a04bd
- Parents:
- c2db02a
- Location:
- uspace/lib/c
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/include/perf.h
rc2db02a r5fbc1f9 64 64 * @param nanos Elapsed time in nanoseconds to set. 65 65 */ 66 static inline void stopwatch_set_ elapsed(stopwatch_t *stopwatch, nsec_t nanos)66 static inline void stopwatch_set_nanos(stopwatch_t *stopwatch, nsec_t nanos) 67 67 { 68 68 stopwatch->start.tv_sec = 0; -
uspace/lib/c/test/perf.c
rc2db02a r5fbc1f9 66 66 { 67 67 stopwatch_t sw = STOPWATCH_INITIALIZE_STATIC; 68 stopwatch_set_ elapsed(&sw, 42);68 stopwatch_set_nanos(&sw, 42); 69 69 PCUT_ASSERT_INT_EQUALS(42, (int) stopwatch_get_nanos(&sw)); 70 70 } … … 74 74 { 75 75 stopwatch_t sw = STOPWATCH_INITIALIZE_STATIC; 76 stopwatch_set_ elapsed(&sw, 4200000000021);76 stopwatch_set_nanos(&sw, 4200000000021); 77 77 PCUT_ASSERT_EQUALS(4200000000021, (long long) stopwatch_get_nanos(&sw)); 78 78 }
Note:
See TracChangeset
for help on using the changeset viewer.