Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- module TimePlusControlLib
- def self.start
- $tpclt = Time.now
- end
- def self.stop
- $tpcls = Time.now
- end
- def self.get(a=0)
- case a
- when 0 then return Time.now - $tpclt
- when 1 then return $tpcls - $tpclt
- else return Time.now - $tpclt
- end
- end
- def self.clear(a=2)
- case a
- when 0 then $tpclt = 0
- when 1 then $tpcls = 0
- else
- $tpclt = 0
- $tpcls = 0
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement