2008-12-07 00:01:17 -05:00
|
|
|
! Copyright (C) 2008 Doug Coleman.
|
|
|
|
! See http://factorcode.org/license.txt for BSD license.
|
2008-11-19 02:50:05 -05:00
|
|
|
USING: kernel math threads system calendar ;
|
2007-09-20 18:09:08 -04:00
|
|
|
IN: crypto.timing
|
|
|
|
|
2008-04-03 14:57:33 -04:00
|
|
|
: with-timing ( quot n -- )
|
2007-09-20 18:09:08 -04:00
|
|
|
#! force the quotation to execute in, at minimum, n milliseconds
|
2008-11-19 02:50:05 -05:00
|
|
|
millis 2slip millis - + milliseconds sleep ; inline
|