-
-
Save meme/8bb83dd617d30438e8d752bfa9e73334 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var buffer: [64]u8 = undefined; | |
const clock: c.time_t = c.time(null); | |
const time: ?*c.tm = c.localtime(&clock); | |
const size = c.strftime(@ptrCast([*]u8, &buffer), @sizeOf(@TypeOf(buffer)), "%Y-%m-%d %H:%M:%S", time); | |
const stdout = &std.io.getStdOut().outStream().stream; | |
std.debug.warn("{}", .{buffer[0..size]}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment