MySQL 8.0.39
Source Code Documentation
|
Functions for manipulating timespec structs and get_date for converting a time_t to string using various date formats. More...
#include "my_systime.h"
#include "my_config.h"
#include <assert.h>
#include <algorithm>
#include <chrono>
#include <cstdio>
#include <ctime>
#include <limits>
#include <time.h>
Functions | |
void | set_timespec_nsec (struct timespec *abstime, Timeout_type nsec) |
Set the value of a timespec object to the current time plus a number of nanosconds. More... | |
void | set_timespec (struct timespec *abstime, Timeout_type sec) |
Set the value of a timespec object to the current time plus a number of seconds using seconds. More... | |
void | get_date (char *to, int flag, time_t date) |
Store textual representation of date in a character array. More... | |
Functions for manipulating timespec structs and get_date for converting a time_t to string using various date formats.
void get_date | ( | char * | to, |
int | flag, | ||
time_t | date | ||
) |
Store textual representation of date in a character array.
[out] | to | character array where date will be written |
flag | format of date: If flag & GETDATE_TIME Return date and time If flag & GETDATE_SHORT_DATE Return short date format YYMMDD If flag & GETDATE_HHMMSSTIME Return time in HHMMDD format. If flag & GETDATE_GMT Date/time in GMT If flag & GETDATE_FIXEDLENGTH Return fixed length date/time | |
date | time_t value for conversion. |
void set_timespec | ( | struct timespec * | abstime, |
Timeout_type | sec | ||
) |
Set the value of a timespec object to the current time plus a number of seconds using seconds.
[out] | abstime | time value being modified |
sec | number of seconds to add to current time |
void set_timespec_nsec | ( | struct timespec * | abstime, |
Timeout_type | nsec | ||
) |
Set the value of a timespec object to the current time plus a number of nanosconds.
[out] | abstime | time value being modified |
nsec | number of nanoseconds to add to current time |