1*5c2921b0SApple OSS Distributions #include <mach/mach_time.h> 2*5c2921b0SApple OSS Distributions 3*5c2921b0SApple OSS Distributions #include <darwintest.h> 4*5c2921b0SApple OSS Distributions 5*5c2921b0SApple OSS Distributions T_GLOBAL_META(T_META_RUN_CONCURRENTLY(true)); 6*5c2921b0SApple OSS Distributions 7*5c2921b0SApple OSS Distributions extern kern_return_t mach_timebase_info_trap(mach_timebase_info_t info); 8*5c2921b0SApple OSS Distributions 9*5c2921b0SApple OSS Distributions T_DECL(mach_timebase_info, "mach_timebase_info(_trap)", 10*5c2921b0SApple OSS Distributions T_META_ALL_VALID_ARCHS(true), T_META_LTEPHASE(LTE_POSTINIT)) 11*5c2921b0SApple OSS Distributions { 12*5c2921b0SApple OSS Distributions mach_timebase_info_data_t a, b, c; 13*5c2921b0SApple OSS Distributions 14*5c2921b0SApple OSS Distributions T_ASSERT_EQ(KERN_SUCCESS, mach_timebase_info(&a), NULL); 15*5c2921b0SApple OSS Distributions T_ASSERT_EQ(KERN_SUCCESS, mach_timebase_info(&b), NULL); 16*5c2921b0SApple OSS Distributions T_ASSERT_EQ(KERN_SUCCESS, mach_timebase_info_trap(&c), NULL); 17*5c2921b0SApple OSS Distributions 18*5c2921b0SApple OSS Distributions T_EXPECT_EQ(a.numer, b.numer, NULL); 19*5c2921b0SApple OSS Distributions T_EXPECT_EQ(a.denom, b.denom, NULL); 20*5c2921b0SApple OSS Distributions T_EXPECT_EQ(a.numer, c.numer, NULL); 21*5c2921b0SApple OSS Distributions T_EXPECT_EQ(a.denom, c.denom, NULL); 22*5c2921b0SApple OSS Distributions } 23