factor/extra/crypto/timing/timing.factor

9 lines
309 B
Factor
Raw Normal View History

2008-12-07 00:01:17 -05:00
! Copyright (C) 2008 Doug Coleman.
! See http://factorcode.org/license.txt for BSD license.
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
millis 2slip millis - + milliseconds sleep ; inline