Minecraft commands time and input?

em
1

I have two questions about command blocks in Minecraft. How is it possible to measure time? And how is it possible to have a submitted input printed out in a command block. For example: Mark is the first to finish and then the message "Mark wins" is in the chat. But if Ben finishes first, it says "Ben wins". Can someone help me / recommend a good website to me? I'm still unsuccessful after a constant search.

Be

As for your first question, you create a scoreboard and add a point to every tick. If you want the result to be converted into seconds and minutes, just write me and I can explain it to you.

And the second question, you can easily solve with this tellraw:

/ tellraw @a ["", {"selector": "@ p", "color": "dark_red"}, {"text": "wins", "color": "dark_red"}]

I generated this command with https://minecraft.tools/de/tellraw.php?tellraw=%3Cspan%20style%3D%22color%3A%23AA0000%22%3E%3Ccode%20class%3D%22selector%22%3E%40p%3C%2Fcode%3E%26nbsp%3Bgewinnt%3C%2Fspan%3E&selector=%40a