diff options
Diffstat (limited to 'slof/fs/timebase.fs')
-rw-r--r-- | slof/fs/timebase.fs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/slof/fs/timebase.fs b/slof/fs/timebase.fs new file mode 100644 index 0000000..2184587 --- /dev/null +++ b/slof/fs/timebase.fs @@ -0,0 +1,19 @@ +\ ***************************************************************************** +\ * Copyright (c) 2004, 2007 IBM Corporation +\ * All rights reserved. +\ * This program and the accompanying materials +\ * are made available under the terms of the BSD License +\ * which accompanies this distribution, and is available at +\ * http://www.opensource.org/licenses/bsd-license.php +\ * +\ * Contributors: +\ * IBM Corporation - initial implementation +\ ****************************************************************************/ +\ Define all timebase related words + +: milliseconds ( -- ms ) tbl@ d# 1000 * tb-frequency / ; +: microseconds ( -- us ) tbl@ d# 1000000 * tb-frequency / ; + +: ms ( ms-to-wait -- ) milliseconds + BEGIN milliseconds over >= UNTIL drop ; +: get-msecs ( -- n ) milliseconds ; +: us ( us-to-wait -- ) microseconds + BEGIN microseconds over >= UNTIL drop ; |