gmtime_r(&srv_t.
Sec(), &
t);
67time_t loc_time = mktime(&
t);
71 return(60 -
t.tm_min) * 60 - (
t.tm_sec - 1);
105 stringis(
"\": "), eol(
",\n\"");
119*(
buf++) =
char(num +
'0');
157 char* start_buf =
buf;
162gmtime_r(&sec, &
t);
184 if( tv_sec == 0 && tv_nsec == 0) {
230 #if __NC_TASKS_MONITOR 231m_TaskName =
"CTZAdjuster";
Task controlling a socket.
CSrvSocketTask & WriteText(CTempString message)
Write text into socket.
CSrvSocketTask & WriteNumber(NumType num)
Write number into socket as string, i.e.
Main working entity in TaskServer.
void RunAfter(Uint4 delay_sec)
This call is basically equivalent to SetRunnable() but with guarantee that task will be scheduled for...
void SetRunnable(bool boost=false)
Set this task "runnable", i.e.
Class incorporating convenient methods to work with struct timespec.
static int TZAdjustment(void)
Timezone adjustment (in seconds) for times stored in CSrvTime.
time_t & Sec(void)
Read/set number of seconds since epoch stored in the object.
static CSrvTime Current(void)
Exact current time with precision up to nanoseconds.
Uint1 Print(char *buf, EFormatType fmt) const
Formats time value in the object and writes it in buf.
long & NSec(void)
Read/set number of nanoseconds stored in the object.
EFormatType
Type of time formatting in the Print() method.
@ eFmtHumanUSecs
Format that can be readable by humans with precision up to microseconds.
@ eFmtHumanSeconds
Format that can be readable by humans with precision up to seconds.
@ eFmtJson
For JSON output.
@ eFmtLogging
Format used in logs which is YYYY-MM-DDThh:mm:ss.ssssss.
virtual void ExecuteSlice(TSrvThreadNum thr_num)
This is the main method to do all work this task should do.
virtual ~CTZAdjuster(void)
static bool IsInShutdown(void)
Checks if TaskServer received request to shutdown.
CTempString implements a light-weight string on top of a storage buffer whose lifetime management is ...
void Error(CExceptionArgs_Base &args)
uint8_t Uint1
1-byte (8-bit) unsigned integer
uint32_t Uint4
4-byte (32-bit) unsigned integer
uint64_t Uint8
8-byte (64-bit) unsigned integer
virtual int GetInt(const string §ion, const string &name, int default_value, TFlags flags=0, EErrAction err_action=eThrow) const
Get integer value of specified parameter name.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
unsigned int
A callback function used to compare two keys in a database.
Process information in the NCBI Registry, including working with configuration files.
#define SRV_LOG(sev, msg)
Macro to be used for printing log messages.
constexpr Uint8 kUSecsPerSecond
constexpr Uint8 kNSecsPerUSec
Uint2 TSrvThreadNum
Type for thread number in TaskServer.
bool ReConfig_TimeMan(const CTempString &, const CNcbiRegistry &, string &)
static void s_Print3Digs(char *&buf, int num)
void WriteSetup_TimeMan(CSrvSocketTask &task)
static void s_Print4Digs(char *&buf, int num)
static void s_Print6Digs(char *&buf, int num)
static void s_Print2Digs(char *&buf, int num)
static void s_Print1Dig(char *&buf, int num)
static time_t s_TZAdjustment
static CTZAdjuster * s_Adjuster
static Uint4 s_InitTZAdjustment(void)
void ConfigureTimeMan(const CNcbiRegistry *reg, CTempString section)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4