https://bitbucket.org/ernstmartinj/ocaml-core | OCaml | 422 lines

9 if Sys.word_size = 64 then 10 Float.iround_towards_zero (Time.to_float t1 *. 1000.) = Float.iround_towards_zero (Time.to_float t2 *. 1000.) 11 else 27 let reasonable_time time = (* between about 1970 and 2070 *) 28 let time = Time.to_float time in 29 time > 0. && time < 100. *. 52. *. 24. *. 60. *. 60. 31 let similar_time time time' = 32 let time = Time.to_float time in 33 let time' = Time.to_float time' in 223 else begin 224 Printf.printf "

bad time: %f

%!" (Time.to_float time); 225 exit 7; 310 let now = Time.now () in 311 let now_f = Time.to_float now in 312 let utimes = Time.to_local_ofday now :: List.map times ~f:(Time.Ofday.of_string) in

https://bitbucket.org/ogu/ibx.git | OCaml | 1,658 lines

93 Pickler.Spec.(wrap (value (required int64)) 94 (fun tm -> Int64.of_float (Time.to_float tm)))) 95 end

https://github.com/avsm/core.git | OCaml | 506 lines

9 if Sys.word_size = 64 then 10 Float.iround ~dir:`Zero (Time.to_float t1 *. 1000.) = Float.iround ~dir:`Zero (Time.to_float t2 *. 1000.) 11 else 27 let reasonable_time time = (* between about 1970 and 2070 *) 28 let time = Time.to_float time in 29 time > 0. && time < 100. *. 52. *. 24. *. 60. *. 60. 31 let similar_time time time' = 32 let time = Time.to_float time in 33 let time' = Time.to_float time' in 138 139 let of_time_internal time = of_tm (Unix.localtime (Float.round ~dir:`Down (Time.to_float time))) 140 308 else begin 309 Printf.printf "

bad time: %f

%!" (Time.to_float time); 310 exit 7;

https://github.com/amirmc/core.git | OCaml | 506 lines

9 if Sys.word_size = 64 then 10 Float.iround ~dir:`Zero (Time.to_float t1 *. 1000.) = Float.iround ~dir:`Zero (Time.to_float t2 *. 1000.) 11 else 27 let reasonable_time time = (* between about 1970 and 2070 *) 28 let time = Time.to_float time in 29 time > 0. && time < 100. *. 52. *. 24. *. 60. *. 60. 31 let similar_time time time' = 32 let time = Time.to_float time in 33 let time' = Time.to_float time' in 138 139 let of_time_internal time = of_tm (Unix.localtime (Float.round ~dir:`Down (Time.to_float time))) 140 308 else begin 309 Printf.printf "

bad time: %f

%!" (Time.to_float time); 310 exit 7;

https://github.com/AltGr/ocp-indent-tests.git | OCaml | 506 lines

9 if Sys.word_size = 64 then 10 Float.iround ~dir:`Zero (Time.to_float t1 *. 1000.) = Float.iround ~dir:`Zero (Time.to_float t2 *. 1000.) 11 else 27 let reasonable_time time = (* between about 1970 and 2070 *) 28 let time = Time.to_float time in 29 time > 0. && time < 100. *. 52. *. 24. *. 60. *. 60. 31 let similar_time time time' = 32 let time = Time.to_float time in 33 let time' = Time.to_float time' in 138 139 let of_time_internal time = of_tm (Unix.localtime (Float.round ~dir:`Down (Time.to_float time))) 140 308 else begin 309 Printf.printf "

bad time: %f

%!" (Time.to_float time); 310 exit 7;

https://github.com/AltGr/ocp-indent-tests.git | OCaml | 506 lines

9 if Sys.word_size = 64 then 10 Float.iround ~dir:`Zero (Time.to_float t1 *. 1000.) = Float.iround ~dir:`Zero (Time.to_float t2 *. 1000.) 11 else 27 let reasonable_time time = (* between about 1970 and 2070 *) 28 let time = Time.to_float time in 29 time > 0. && time < 100. *. 52. *. 24. *. 60. *. 60. 31 let similar_time time time' = 32 let time = Time.to_float time in 33 let time' = Time.to_float time' in 138 139 let of_time_internal time = of_tm (Unix.localtime (Float.round ~dir:`Down (Time.to_float time))) 140 308 else begin 309 Printf.printf "

bad time: %f

%!" (Time.to_float time); 310 exit 7;

git://github.com/monadbobo/ocaml-core.git | OCaml | 421 lines

9 if Sys.word_size = 64 then 10 Float.iround_towards_zero (Time.to_float t1 *. 1000.) = Float.iround_towards_zero (Time.to_float t2 *. 1000.) 11 else 27 let reasonable_time time = (* between about 1970 and 2070 *) 28 let time = Time.to_float time in 29 time > 0. && time < 100. *. 52. *. 24. *. 60. *. 60. 31 let similar_time time time' = 32 let time = Time.to_float time in 33 let time' = Time.to_float time' in 223 else begin 224 Printf.printf "

bad time: %f

%!" (Time.to_float time); 225 exit 7; 310 let now = Time.now () in 311 let now_f = Time.to_float now in 312 let utimes = Time.to_local_ofday now :: List.map times ~f:(Time.Ofday.of_string) in

https://bitbucket.org/AlexBobkov/avango | OCaml | 157 lines

44 s.rate_n 45 (Time.to_float s.rate_t) 46 (Time.to_float s.rate) ; 47 sprintf "start=%f, nsent=%d" 48 (Time.to_float s.start) 49 s.nsent ; 50 sprintf "sweep=%f

" 51 (Time.to_float s.sweep) 52 |] )

https://github.com/avsm/core.git | OCaml | 562 lines

1 open Std_internal 2 module Unix = Core_unix 3 4 module Stable = struct 5 module V1 = struct 6 (* this is a recreation of the algorithm used internally by the linux kernel 7 (supposedly invented by Gauss). In this case it is used to produce the number 8 of seconds since 1970-01-01 00:00:00 using epoch time semantics (86,400 seconds 9 per day) *) 10 let utc_mktime ~year ~month ~day ~hour ~min ~sec ~ms ~us = 11 (* move February to the conceptual end of the ordering - 1..12 -> 11,12,1..10 - 12 because it carries the leap day. The months are 0 indexed for this calculation, 13 so 1 is February. *) 14 let shuffle_year_month year month = 15 let month = month - 2 in

https://github.com/amirmc/core.git | OCaml | 562 lines

1 open Std_internal 2 module Unix = Core_unix 3 4 module Stable = struct 5 module V1 = struct 6 (* this is a recreation of the algorithm used internally by the linux kernel 7 (supposedly invented by Gauss). In this case it is used to produce the number 8 of seconds since 1970-01-01 00:00:00 using epoch time semantics (86,400 seconds 9 per day) *) 10 let utc_mktime ~year ~month ~day ~hour ~min ~sec ~ms ~us = 11 (* move February to the conceptual end of the ordering - 1..12 -> 11,12,1..10 - 12 because it carries the leap day. The months are 0 indexed for this calculation, 13 so 1 is February. *) 14 let shuffle_year_month year month = 15 let month = month - 2 in

https://github.com/AltGr/ocp-indent-tests.git | OCaml | 562 lines

1 open Std_internal 2 module Unix = Core_unix 3 4 module Stable = struct 5 module V1 = struct 6 (* this is a recreation of the algorithm used internally by the linux kernel 7 (supposedly invented by Gauss). In this case it is used to produce the number 8 of seconds since 1970-01-01 00:00:00 using epoch time semantics (86,400 seconds 9 per day) *) 10 let utc_mktime ~year ~month ~day ~hour ~min ~sec ~ms ~us = 11 (* move February to the conceptual end of the ordering - 1..12 -> 11,12,1..10 - 12 because it carries the leap day. The months are 0 indexed for this calculation, 13 so 1 is February. *) 14 let shuffle_year_month year month = 15 let month = month - 2 in

https://github.com/AltGr/ocp-indent-tests.git | OCaml | 562 lines

1 open Std_internal 2 module Unix = Core_unix 3 4 module Stable = struct 5 module V1 = struct 6 (* this is a recreation of the algorithm used internally by the linux kernel 7 (supposedly invented by Gauss). In this case it is used to produce the number 8 of seconds since 1970-01-01 00:00:00 using epoch time semantics (86,400 seconds 9 per day) *) 10 let utc_mktime ~year ~month ~day ~hour ~min ~sec ~ms ~us = 11 (* move February to the conceptual end of the ordering - 1..12 -> 11,12,1..10 - 12 because it carries the leap day. The months are 0 indexed for this calculation, 13 so 1 is February. *) 14 let shuffle_year_month year month = 15 let month = month - 2 in

https://bitbucket.org/seanmcl/ocaml-core | OCaml | 418 lines

1 open Std_internal 2 module Unix = Core_unix 3 4 (* this is a recreation of the algorithm used internally by the linux kernel 5 (supposedly invented by Gauss). In this case it is used to produce the number 6 of seconds since 1970-01-01 00:00:00 using epoch time semantics (86,400 seconds 7 per day *) 8 let utc_mktime ~year ~month ~day ~hour ~min ~sec ~ms ~us = 9 (* move February to the conceptual end of the ordering - 1..12 -> 11,12,1..10 - 10 because it carries the leap day. The months are 0 indexed for this calculation, 11 so 1 is February. *) 12 let shuffle_year_month year month = 13 let month = month - 2 in 14 if month <= 0 then (year - 1, month + 12) else (year,month) 15 in

https://github.com/cgsb/hitscore.git | OCaml | 611 lines

1 2 open Hitscore_std 3 4 5 module Timestamp = struct 6 include Core.Std.Time 7 end 8 9 module Bytea = struct 10 11 let is_first_oct_digit c = c >= '0' && c <= '3' 12 let is_oct_digit c = c >= '0' && c <= '7' 13 let oct_val c = Char.to_int c - 0x30 14 15 let is_hex_digit = function '0'..'9' | 'a'..'f' | 'A'..'F' -> true | _ -> false

https://bitbucket.org/ernstmartinj/ocaml-core | OCaml | 418 lines

1 open Common 2 open Std_internal 3 module Unix = Core_unix 4 5 (* this is a recreation of the algorithm used internally by the linux kernel 6 (supposedly invented by Gauss). In this case it is used to produce the number 7 of seconds since 1970-01-01 00:00:00 using epoch time semantics (86,400 seconds 8 per day *) 9 let utc_mktime ~year ~month ~day ~hour ~min ~sec ~ms ~us = 10 (* move February to the conceptual end of the ordering - 1..12 -> 11,12,1..10 - 11 because it carries the leap day. The months are 0 indexed for this calculation, 12 so 1 is February. *) 13 let shuffle_year_month year month = 14 let month = month - 2 in 15 if month <= 0 then (year - 1, month + 12) else (year,month)

git://github.com/monadbobo/ocaml-core.git | OCaml | 418 lines

1 open Common 2 open Std_internal 3 module Unix = Core_unix 4 5 (* this is a recreation of the algorithm used internally by the linux kernel 6 (supposedly invented by Gauss). In this case it is used to produce the number 7 of seconds since 1970-01-01 00:00:00 using epoch time semantics (86,400 seconds 8 per day *) 9 let utc_mktime ~year ~month ~day ~hour ~min ~sec ~ms ~us = 10 (* move February to the conceptual end of the ordering - 1..12 -> 11,12,1..10 - 11 because it carries the leap day. The months are 0 indexed for this calculation, 12 so 1 is February. *) 13 let shuffle_year_month year month = 14 let month = month - 2 in 15 if month <= 0 then (year - 1, month + 12) else (year,month)

https://bitbucket.org/AlexBobkov/avango | OCaml | 608 lines

80 let frac_of_time () = 81 let t = Time.to_float (Time.gettimeofday ()) in 82 let sec = float (Pervasives.truncate t) in 577 let time1 = Time.gettimeofday () in 578 let diff = Time.to_float (Time.sub time1 time0) in 579 printf "

time for %d diffie-hellman exponentiations (key_len=%d)= %f(sec)

"

https://bitbucket.org/AlexBobkov/avango | OCaml | 146 lines

27 let schedule time = 28 let timef = Time.to_float time in 29 let now = Time.gettimeofday () in 29 let now = Time.gettimeofday () in 30 let now = Time.to_float now in 31 let milli = (timef -. now) *. 1000.0 in

https://github.com/cgsb/hitscoreweb.git | OCaml | 856 lines

1 2 open Hitscoreweb_std_server 3 open Hitscore 4 5 module Msg = Hitscoreweb_messages 6 7 module Services = Hitscoreweb_services 8 9 module Authentication = Hitscoreweb_authentication 10 11 module Template = Hitscoreweb_template 12 13 module Persons_service = Hitscoreweb_persons 14 module Web_data_access = Hitscoreweb_data_access 15

https://github.com/cgsb/hitscore.git | OCaml | 612 lines