mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-07-26 02:27:21 +03:00
Initialization utilities for nstime
This commit is contained in:
parent
dd649c9485
commit
1d01e4c770
12 changed files with 46 additions and 41 deletions
|
|
@ -83,9 +83,8 @@ TEST_BEGIN(test_background_thread_running) {
|
|||
assert_b_eq(info->state, background_thread_started,
|
||||
"Background_thread did not start.\n");
|
||||
|
||||
nstime_t start, now;
|
||||
nstime_init(&start, 0);
|
||||
nstime_update(&start);
|
||||
nstime_t start;
|
||||
nstime_init_update(&start);
|
||||
|
||||
bool ran = false;
|
||||
while (true) {
|
||||
|
|
@ -98,8 +97,8 @@ TEST_BEGIN(test_background_thread_running) {
|
|||
break;
|
||||
}
|
||||
|
||||
nstime_init(&now, 0);
|
||||
nstime_update(&now);
|
||||
nstime_t now;
|
||||
nstime_init_update(&now);
|
||||
nstime_subtract(&now, &start);
|
||||
assert_u64_lt(nstime_sec(&now), 1000,
|
||||
"Background threads did not run for 1000 seconds.");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue