ns_baseunit - Check whether the provided byte-array contains a valid UTF-8 byte sequence
Convert from memory units or from time units to its base value using the NaviServer internal converters, which are used the same way for various commands. The base unit for a memory size is a byte, for a time value a second). This command os necessary to provide Tcl-level commands calculating with these units to support uniform interfaces (e.g. calculating cache partition sizes base on values such as 2MB).
Either -size size or -time time has to be specified. Valid time units are μs, ms, s, m, h, d, w, y. Valid size units are kB, MB, GB, KiB, MiB, GiB.
% ns_baseunit -size 10KB 10240 ns_baseunit -time 2.5h 9000