File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -18,22 +18,22 @@ namespace cpp = LIBC_NAMESPACE::cpp;
1818TEST (LlvmLibcGettimeofday, SmokeTest) {
1919 using LIBC_NAMESPACE::testing::ErrnoSetterMatcher::Succeeds;
2020 void *tz = nullptr ;
21- struct timeval tv;
21+ timeval tv;
2222
23- int sleep_times[2 ] = {200 , 1000 };
23+ suseconds_t sleep_times[2 ] = {200 , 1000 };
2424 for (int i = 0 ; i < 2 ; i++) {
2525 int ret = LIBC_NAMESPACE::gettimeofday (&tv, tz);
2626 ASSERT_EQ (ret, 0 );
2727
28- int sleep_time = sleep_times[i];
28+ suseconds_t sleep_time = sleep_times[i];
2929 // Sleep for {sleep_time} microsceconds.
30- struct timespec tim = {0 , sleep_time * 1000 };
31- struct timespec tim2 = {0 , 0 };
30+ timespec tim = {0 , sleep_time * 1000 };
31+ timespec tim2 = {0 , 0 };
3232 ret = LIBC_NAMESPACE::nanosleep (&tim, &tim2);
3333
3434 // Call gettimeofday again and verify that it is more {sleep_time}
3535 // microscecods.
36- struct timeval tv1;
36+ timeval tv1;
3737 ret = LIBC_NAMESPACE::gettimeofday (&tv1, tz);
3838 ASSERT_EQ (ret, 0 );
3939 ASSERT_GE (tv1.tv_usec - tv.tv_usec , sleep_time);
You can’t perform that action at this time.
0 commit comments