Rebol Programming/delta-time

From Wikibooks, open books for an open world
Jump to navigation Jump to search

USAGE:[edit | edit source]

DELTA-TIME block 

DESCRIPTION:[edit | edit source]

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

DELTA-TIME is a function value.

ARGUMENTS[edit | edit source]

  • block -- (Type: block)

SOURCE CODE[edit | edit source]

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
]