diff --git a/test/ExecutionTests.jl b/test/ExecutionTests.jl index 9f7f7924..7d70b51f 100644 --- a/test/ExecutionTests.jl +++ b/test/ExecutionTests.jl @@ -184,4 +184,16 @@ let fname = tempname() end end +############ +# cpu-time # +############ + +# some simple sanity checks +t = @benchmark sleep(1) +@test cputime(t) < 1e9 +t = @benchmark sin(1) +if BenchmarkTools.Timers.ACCURATE_CPUTIME + @test cputime(t) > 5e8 # 50% cputime +end + end # module