REBOL Programming/delta-time

From Wikibooks, open books for an open world
< REBOL Programming
Jump to: navigation, search

USAGE:[edit]

DELTA-TIME block 

DESCRIPTION:[edit]

Delta-time - returns the time it takes to evaluate the block.

DELTA-TIME is a function value.

ARGUMENTS[edit]

  • block -- (Type: block)

SOURCE CODE[edit]

delta-time: func [
    {Delta-time - returns the time it takes to evaluate the block.} 
    block [block!] /local 
    start
][
    start: now/precise 
    do block 
    difference now/precise start
]