PR3L-TestatSystem-Abgabe1/Testat-Planer.zig

28 lines
659 B
Zig
Raw Normal View History

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.*);
}