How to get the current time in seconds-since-the-epoch with `awk`:
```
awk 'BEGIN {srand(); print srand()}'
```
@th Wow, it's actually documented that way in the man; so it worked on both mawk and gawk.
@th wild, i love it! I can't think of any other platform where you can inspect the rng seed like that.
@phooky have you seen Guy Steele's "Fast splittable PRNG" for deterministic multi-threaded pseudorandomness? https://dl.acm.org/doi/abs/10.1145/2660193.2660195
@phooky the most famous is probably RSA's `Dual_EC_DRBG`, which allows the NSA to predict the value of the rng seed. https://blog.cryptographyengineering.com/category/dual-ec/
@th The awk epoch, you say.
@th groaned aloud at this wow
@th Works as documented ... I guess ...
srand([x])
Set the starting point, or seed, for generating random numbers to the value x.
[...]
If the argument x is omitted, as in ‘srand()’, then the current date and time of day are used for a seed.
[...]
The return value of srand() is the previous seed. This makes it easy to keep track of the seeds in case you need to consistently reproduce sequences of random numbers.