fork download
  1. import std.stdio;
  2.  
  3. void foo()
  4. {
  5. import core.thread;
  6. Thread.sleep(dur!"seconds"(1));
  7. }
  8.  
  9. void main(string[] args)
  10. {
  11. import std.datetime;
  12. StopWatch sw;
  13. sw.start;
  14. foo;
  15. writeln(sw.peek.nsecs);
  16. }
Success #stdin #stdout 0s 2876KB
stdin
Standard input is empty
stdout
1001302394