File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -903,6 +903,10 @@ pub const Timestamp = struct {
903903 return .{ .nanoseconds = x };
904904 }
905905
906+ pub fn toMilliseconds (t : Timestamp ) i64 {
907+ return @intCast (@divTrunc (t .nanoseconds , std .time .ns_per_ms ));
908+ }
909+
906910 pub fn toSeconds (t : Timestamp ) i64 {
907911 return @intCast (@divTrunc (t .nanoseconds , std .time .ns_per_s ));
908912 }
Original file line number Diff line number Diff line change @@ -2176,6 +2176,14 @@ const UnaryOp = enum {
21762176 .ceil = > .Ceil ,
21772177 .trunc = > .Trunc ,
21782178 .round = > .Round ,
2179+ .sin = > .Sin ,
2180+ .cos = > .Cos ,
2181+ .tan = > .Tan ,
2182+ .sqrt = > .Sqrt ,
2183+ .exp = > .Exp ,
2184+ .exp2 = > .Exp2 ,
2185+ .log = > .Log ,
2186+ .log2 = > .Log2 ,
21792187 else = > return null ,
21802188 })),
21812189 else = > unreachable ,
You can’t perform that action at this time.
0 commit comments