Skip to content

Commit

Permalink
[core/system.pm] add a sleep() function that does and returns fractio…
Browse files Browse the repository at this point in the history
…nal seconds
  • Loading branch information
Martin Berends committed Feb 10, 2010
1 parent 54ca0fa commit df1e34e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/core/system.pm
Expand Up @@ -16,3 +16,10 @@ sub run($commandline) {
%r = box status
}
}

sub sleep($seconds) { # fractional seconds also allowed
my $time1 = time;
pir::sleep__vN($seconds);
my $time2 = time;
return $time2 - $time1;
}

0 comments on commit df1e34e

Please sign in to comment.