19 #include <sys/types.h>
22 #include <sys/times.h>
41 const static astring TMP_VARIABLE_NAME(
"TMP");
52 if (!!to_return)
set(
"TMP", to_return);
63 char *value = getenv(variable_name.
observe());
79 ret = setenv(variable_name.
s(), value.
s(),
true);
89 static clock_t __ctps = sysconf(_SC_CLK_TCK);
90 static const double __multiplier = 1000.0 / double(__ctps);
98 double ticks_up = (double)real_ticks;
99 ticks_up = ticks_up * __multiplier;
Provides a dynamically resizable ASCII character string.
const char * s() const
synonym for observe. the 's' stands for "string", if that helps.
virtual const char * observe() const
observes the underlying pointer to the zero-terminated string.
static astring TMP()
provides a single place to get the temporary directory.
static astring get(const astring &variable_name)
looks up the "variable_name" in the current environment variables.
static bool set(const astring &variable_name, const astring &value)
adds or creates "variable_name" in the environment.
static basis::un_int system_uptime()
gives the operating system's uptime in a small form that rolls over.
The guards collection helps in testing preconditions and reporting errors.
unsigned int un_int
Abbreviated name for unsigned integers.