This adds a new command line option to the unix port `-X realtime` to
enable realtime priority on threads. This enables high precision timers
for applications that need more accurate timers.
Related docs:
https://developer.apple.com/library/archive/technotes/tn2169/_index.html
Fixes issue #8621.
Signed-off-by: David Lechner <david@pybricks.com>
The default value for MICROPYPATH used in unix/main.c is
"~/.micropython/lib:/usr/lib/micropython" which has 2 problems when used in
the Windows port:
- it has a ':' as path separator but the port uses ';' so the entire string
is effectively discarded since it gets interpreted as a single path which
doesn't exist
- /usr/lib/micropython is not a valid path in a standard Windows
environment
Override the value with a suitable default.
This adds a -h option to print the usage help text and adds a new, shorter
error message that is printed when invalid arguments are given. This
behaviour follows CPython (and other tools) more closely.