8 lines
130 B
CoffeeScript
8 lines
130 B
CoffeeScript
|
|
||
|
# throw error if time limit has been exceeded
|
||
|
|
||
|
module.exports = (limit, msg) ->
|
||
|
|
||
|
if Date.now() > limit
|
||
|
throw new Error msg
|