2024-10-24 13:22:59 +02:00
|
|
|
const std = @import("std");
|
|
|
|
|
|
|
|
const Timestamp = struct {
|
|
|
|
hours: u64,
|
|
|
|
minutes: u64,
|
|
|
|
};
|
|
|
|
|
2024-10-24 15:02:23 +02:00
|
|
|
const testees:[]const []const u8 = &[_][] const u8 {
|
|
|
|
"Nastja",
|
|
|
|
"Vikkes",
|
|
|
|
"Group 3",
|
|
|
|
};
|
|
|
|
const number_of_testees: u64 = testees.len; // len von testees
|
2024-10-24 13:22:59 +02:00
|
|
|
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 {
|
2024-10-24 15:02:23 +02:00
|
|
|
const writer = std.io.getStdOut().writer();
|
2024-10-24 13:22:59 +02:00
|
|
|
var testStamp = Timestamp {
|
|
|
|
.hours = 13,
|
|
|
|
.minutes = 5,
|
|
|
|
};
|
|
|
|
|
2024-10-24 15:02:23 +02:00
|
|
|
try writer.print("Amount tests: {d} \n", .{number_of_testees});
|
|
|
|
for (testees) |row| {
|
|
|
|
try writer.print("Name: {s} \n", .{row});
|
|
|
|
}
|
|
|
|
|
2024-10-24 13:22:59 +02:00
|
|
|
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.*);
|
|
|
|
}
|