PIVX Core  5.6.99
P2P Digital Currency
Classes | Functions
timedata.h File Reference
#include <algorithm>
#include <assert.h>
#include <stdint.h>
#include <vector>
Include dependency graph for timedata.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  CMedianFilter< T >
 Median filter over a stream of values. More...
 

Functions

int64_t abs64 (int64_t n)
 Functions to keep track of adjusted P2P time. More...
 
int64_t GetTimeOffset ()
 "Never go to sea with two chronometers; take one or three." Our three time sources are: More...
 
int64_t GetAdjustedTime ()
 
void AddTimeData (const CNetAddr &ip, int64_t nTime, int nOffsetLimit)
 
int64_t GetTimeSlot (const int64_t nTime)
 
int64_t GetCurrentTimeSlot ()
 

Function Documentation

◆ abs64()

int64_t abs64 ( int64_t  n)
inline

Functions to keep track of adjusted P2P time.

Definition at line 73 of file timedata.h.

◆ AddTimeData()

void AddTimeData ( const CNetAddr ip,
int64_t  nTime,
int  nOffsetLimit 
)

Definition at line 43 of file timedata.cpp.

◆ GetAdjustedTime()

int64_t GetAdjustedTime ( )

Definition at line 36 of file timedata.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetCurrentTimeSlot()

int64_t GetCurrentTimeSlot ( )

Definition at line 106 of file timedata.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetTimeOffset()

int64_t GetTimeOffset ( )

"Never go to sea with two chronometers; take one or three." Our three time sources are:

  • System clock
  • Median of other nodes clocks
  • The user (asking the user to fix the system clock if the first two disagree)

Definition at line 30 of file timedata.cpp.

Here is the caller graph for this function:

◆ GetTimeSlot()

int64_t GetTimeSlot ( const int64_t  nTime)

Definition at line 100 of file timedata.cpp.

Here is the call graph for this function:
Here is the caller graph for this function: