General purpose utility functions aimed at portability, used by Concord.
cog_load_whole_file_fp()- Load file contents into a string (provide aFILE*)cog_load_whole_file()- Load file contents into a string
cog_timezone()- Get your local timezone (difference between UTC and local time in seconds)cog_sleep_ms()- Sleep for milliseconds amountcog_sleep_us()- Sleep for microseconds amountcog_timestamp_ms()- Get the current timestamp in millisecondscog_timestamp_us()- Get the current timestamp in microseconds
cog_iso8601_to_unix_ms()- Convert a iso8601 string to unix timestamp (milliseconds)cog_unix_ms_to_iso8601()- Convert a unix timestamp (milliseconds) to a iso8601 stringcog_strtou64()- Convert a numerical string touint64_tcog_u64tostr()- Convertuint64_tto a numerical string
cog_strndup()- analogous to strndup()cog_asprintf()- analogous to asprintf()
This software is distributed under MIT license, so feel free to integrate it in your commercial products.