2 ms·
One could try to guarantee unique outputs with sleep 1 date but the intended requirement of behave_differently is that it produces different output when r
by tromp 5y ago
One could try to guarantee unique outputs with
sleep 1
date
but the intended requirement of behave_differently is that it produces
different output when run on a computer in exactly the same state. Or equivalently, that the program doesn't depend on the computer state, which is true in the more formal setting of universal Turing machines that start from a fixed state.
- geysersam 5y agoThis does not solve the issue. behave_different.sh has to behave different *all* the time *on every input*. Not just 99.999999% of the time. Imagine my_program.sh says: echo "2022-02-26 10:30:00" and you run your version of behave_differently.sh at 10:29:59 on the 26/2. Then the output is the same.