Class: SFML::Clock
- Inherits:
-
Object
- Object
- SFML::Clock
- Defined in:
- lib/sfml/system/clock.rb
Overview
Instance Attribute Summary collapse
-
#handle ⇒ Object
readonly
:nodoc:.
Instance Method Summary collapse
- #elapsed_time ⇒ Object (also: #elapsed)
-
#initialize ⇒ Clock
constructor
A new instance of Clock.
- #reset ⇒ Object
- #restart ⇒ Object
- #running? ⇒ Boolean
- #start ⇒ Object
- #stop ⇒ Object
Constructor Details
Instance Attribute Details
#handle ⇒ Object (readonly)
:nodoc:
42 43 44 |
# File 'lib/sfml/system/clock.rb', line 42 def handle @handle end |
Instance Method Details
#elapsed_time ⇒ Object Also known as: elapsed
15 16 17 |
# File 'lib/sfml/system/clock.rb', line 15 def elapsed_time Time.from_native(C::System.sfClock_getElapsedTime(@handle)) end |
#reset ⇒ Object
38 39 40 |
# File 'lib/sfml/system/clock.rb', line 38 def reset Time.from_native(C::System.sfClock_reset(@handle)) end |
#restart ⇒ Object
34 35 36 |
# File 'lib/sfml/system/clock.rb', line 34 def restart Time.from_native(C::System.sfClock_restart(@handle)) end |
#running? ⇒ Boolean
20 21 22 |
# File 'lib/sfml/system/clock.rb', line 20 def running? C::System.sfClock_isRunning(@handle) end |