/
oo_sfml_system.mli
49 lines (48 loc) · 1.36 KB
/
oo_sfml_system.mli
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
(** *)
(** {{:http://www.sfml-dev.org/documentation/2.0/group__system.php}
Online documentation for the system module} *)
type time_src =
[ `of_microseconds of int64
| `of_milliseconds of int32
| `of_seconds of float
| `of_sfTime of SFTime.t ]
class time :
time_src ->
object
val time : SFTime.t
method as_microseconds : unit -> int64
method as_milliseconds : unit -> int32
method as_seconds : unit -> float
method t : SFTime.t
end
module Time :
sig
val add : time -> time -> time
val sub : time -> time -> time
val mul : time -> float -> time
val div : time -> float -> time
val ( + ) : time -> time -> time
val ( - ) : time -> time -> time
val ( * ) : time -> float -> time
val ( / ) : time -> float -> time
end
val sleep : duration:time -> unit
type time_as = [ `microseconds | `milliseconds | `seconds ]
class clock :
object
val clock : SFClock.t
method get_elapsed_time : unit -> SFTime.t
method restart : unit -> SFTime.t
end
class pausable_clock :
paused:bool ->
object
val clock : SFPausableClock.t
method elapsed_time : SFTime.t
method get_elapsed_time : unit -> SFTime.t
method is_paused : unit -> bool
method pause : unit -> unit
method restart : paused:bool -> SFTime.t
method start : unit -> unit
end
val config : < compiled_version : int * int >