xapian-core  1.4.27
Functions
RealTime Namespace Reference

Functions

double now ()
 Return the current time. More...
 
double end_time (double timeout)
 Return the end time for a timeout in timeout seconds. More...
 
void to_timeval (double t, struct timeval *tv)
 Fill in struct timeval from number of seconds in a double. More...
 
void sleep (double t)
 Sleep until the time represented by this object. More...
 

Function Documentation

◆ end_time()

double RealTime::end_time ( double  timeout)
inline

Return the end time for a timeout in timeout seconds.

If timeout is 0, that means "no timeout", so 0 is returned. Otherwise the current time plus timeout seconds is returned.

Definition at line 95 of file realtime.h.

References now().

Referenced by Xapian::DatabaseReplicator::DatabaseReplicator(), RemoteConnection::do_close(), RemoteServer::get_message(), RemoteDatabase::get_message(), RemoteServer::send_message(), and RemoteDatabase::send_message().

◆ now()

double RealTime::now ( )
inline

◆ sleep()

void RealTime::sleep ( double  t)
inline

◆ to_timeval()

void RealTime::to_timeval ( double  t,
struct timeval *  tv 
)
inline

Fill in struct timeval from number of seconds in a double.

Definition at line 110 of file realtime.h.

Referenced by TcpClient::open_socket(), RemoteConnection::read_at_least(), RemoteConnection::send_file(), RemoteConnection::send_message(), set_socket_timeouts(), and sleep().