MXS-1908 Reorder the code slightly

This commit is contained in:
Johan Wikman
2018-06-12 08:37:46 +03:00
parent 9a11394f22
commit 6cc03afdf9

View File

@ -190,9 +190,29 @@ struct filewriter
#endif
};
/**
* Returns the current time.
*
* @return Current monotonic raw time in milliseconds.
*/
static uint64_t time_monotonic_ms()
{
struct timespec now;
clock_gettime(CLOCK_MONOTONIC, &now);
return now.tv_sec * 1000 + now.tv_nsec / 1000000;
}
namespace
{
typedef enum message_suppression
{
MESSAGE_NOT_SUPPRESSED, // Message is not suppressed.
MESSAGE_SUPPRESSED, // Message is suppressed for the first time (for this round)
MESSAGE_STILL_SUPPRESSED // Message is still suppressed (for this round)
} message_suppression_t;
class MessageRegistryKey
{
public:
@ -252,31 +272,6 @@ public:
}
};
}
/**
* Returns the current time.
*
* @return Current monotonic raw time in milliseconds.
*/
static uint64_t time_monotonic_ms()
{
struct timespec now;
clock_gettime(CLOCK_MONOTONIC, &now);
return now.tv_sec * 1000 + now.tv_nsec / 1000000;
}
namespace
{
typedef enum message_suppression
{
MESSAGE_NOT_SUPPRESSED, // Message is not suppressed.
MESSAGE_SUPPRESSED, // Message is suppressed for the first time (for this round)
MESSAGE_STILL_SUPPRESSED // Message is still suppressed (for this round)
} message_suppression_t;
class MessageRegistryStats
{
public: