File tree 1 file changed +4
-2
lines changed
components/libc/compilers/common
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -627,10 +627,11 @@ int clock_getres(clockid_t clockid, struct timespec *res)
627
627
switch (clockid )
628
628
{
629
629
case CLOCK_REALTIME :
630
+ #ifndef RT_USING_CPUTIME
630
631
res -> tv_sec = 0 ;
631
632
res -> tv_nsec = NANOSECOND_PER_SECOND /RT_TICK_PER_SECOND ;
632
633
break ;
633
-
634
+ #endif
634
635
#ifdef RT_USING_CPUTIME
635
636
case CLOCK_CPUTIME_ID :
636
637
res -> tv_sec = 0 ;
@@ -668,6 +669,7 @@ int clock_gettime(clockid_t clockid, struct timespec *tp)
668
669
switch (clockid )
669
670
{
670
671
case CLOCK_REALTIME :
672
+ #ifndef RT_USING_CPUTIME
671
673
{
672
674
rt_tick_t tick ;
673
675
rt_base_t level ;
@@ -679,7 +681,7 @@ int clock_gettime(clockid_t clockid, struct timespec *tp)
679
681
rt_hw_interrupt_enable (level );
680
682
}
681
683
break ;
682
-
684
+ #endif
683
685
#ifdef RT_USING_CPUTIME
684
686
case CLOCK_MONOTONIC :
685
687
case CLOCK_CPUTIME_ID :
You can’t perform that action at this time.
0 commit comments