I think this should be a separate utility and not a shell built-in. This would just be an exec(2) and a couple timer calls, right? How precise does this need to be?
I think this should be a separate utility and not a shell built-in. This would just be an exec(2) and a couple timer calls, right? How precise does this need to be?
I think this should be a separate utility and not a shell built-in. This would just be an exec(2) and a couple timer calls, right? How precise does this need to be?
Having it be a shell builtin would not grant more precision, so I'd say yes. As for how precise, in bash, time outputs values in millisecond precision. It should achieve that at least.
> I think this should be a separate utility and not a shell built-in. This would just be an exec(2) and a couple timer calls, right? How precise does this need to be?
Having it be a shell builtin would not grant more precision, so I'd say yes. As for how precise, in bash, time outputs values in millisecond precision. It should achieve that at least.
Distinct from the Instant type, this time measurement is not monotonic. This means that you can save a file to the file system, then save another file to the file system, and the second file has a SystemTime measurement earlier than the first. In other words, an operation that happens after another operation in real time may have an earlier SystemTime!
> Would a simple wrapper around https://doc.rust-lang.org/std/time/struct.SystemTime.html suffice?
From the doc:
> Distinct from the Instant type, this time measurement is not monotonic. This means that you can save a file to the file system, then save another file to the file system, and the second file has a SystemTime measurement earlier than the first. In other words, an operation that happens after another operation in real time may have an earlier SystemTime!
So probably not. If the system clock changes while the command is running, the output would be erroneous. This ought to be used instead: https://doc.rust-lang.org/std/time/struct.Instant.html
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
We need a utility that can test the length of time a line of shell takes to complete execution and output data formatted as ASV.
I think this should be a separate utility and not a shell built-in. This would just be an exec(2) and a couple timer calls, right? How precise does this need to be?
Would a simple wrapper around https://doc.rust-lang.org/std/time/struct.SystemTime.html suffice?
Having it be a shell builtin would not grant more precision, so I'd say yes. As for how precise, in bash, time outputs values in millisecond precision. It should achieve that at least.
From the doc:
So probably not. If the system clock changes while the command is running, the output would be erroneous. This ought to be used instead: https://doc.rust-lang.org/std/time/struct.Instant.html