diff --git a/time.zig b/time.zig index 40f83ae7154a3800bacef903d657b1f324952438..b154c49dd609afdc51c2d6291f5af46c0bfecc25 100644 --- a/time.zig +++ b/time.zig @@ -235,8 +235,8 @@ pub const DateTime = struct { pub fn to_timespec(self: DateTime) sys.struct_timespec { return .{ - .sec = self.toUnix(), - .nsec = self.ms * ns_per_ms, + .sec = @intCast(self.toUnix()), + .nsec = @as(isize, self.ms) * ns_per_ms, }; }