Make "cmake -E time" useful
Currently cmake -E time
has very limited usefulness. It outputs 2 values: time and clock. Time has precision of 1 s, which is not enough in most cases. Clock has precision of 1 us, which is good, but it shows not the execution time of the child process, as one would expect, but rather that of the parent, which is surprising and barely useful. Actually, I'd consider this a bug.
It would be great if you change cmake -E time
to use e.g. std::chrono::steady_clock::now()
instead of clock()
or add a new command to measure process execution time with high resolution.