From 50d0a243fe29c400662e37004e0c9748d2f14e98 Mon Sep 17 00:00:00 2001 From: 2wenty1ne Date: Thu, 24 Oct 2024 13:22:59 +0200 Subject: [PATCH] Added constants and Timestamp struct Added all the required constants and the timestamp struct. First structure of the printTimestamp function --- Testat-Planer.zig | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 Testat-Planer.zig diff --git a/Testat-Planer.zig b/Testat-Planer.zig new file mode 100644 index 0000000..ec7af60 --- /dev/null +++ b/Testat-Planer.zig @@ -0,0 +1,27 @@ +const std = @import("std"); + +const Timestamp = struct { + hours: u64, + minutes: u64, +}; + +const testees = undefined; +const number_of_testees: u64 = undefined; // len von testees +const total_minutes: u64 = 60; // Gesamte Dauer in min +const pause_minutes: u64 = 2; // Länge der Pause zwischen 2 Testaten + + +pub fn main () !void { + var testStamp = Timestamp { + .hours = 13, + .minutes = 5, + }; + + try printTimestamp(&testStamp); +} + +// Printet timestamp im Format HH:MM +pub fn printTimestamp(ts: *Timestamp) !void { + const writer = std.io.getStdOut().writer(); + try writer.print("{d}:{d}", ts.*); +}