greenplumn CWallClock 源码

  • 2022-08-18
  • 浏览 (349)

greenplumn CWallClock 代码

文件路径:/src/backend/gporca/libgpos/include/gpos/common/CWallClock.h

//---------------------------------------------------------------------------
//	Greenplum Database
//	Copyright (C) 2011 EMC Corp.
//
//	@filename:
//		CWallClock.h
//
//	@doc:
//		A timer which records wall clock time;
//---------------------------------------------------------------------------
#ifndef GPOS_CWallClock_H
#define GPOS_CWallClock_H

#include "gpos/common/ITimer.h"

namespace gpos
{
//---------------------------------------------------------------------------
//	@class:
//		CWallClock
//
//	@doc:
//		Records wall clock time;
//
//---------------------------------------------------------------------------
class CWallClock : public ITimer
{
private:
	// actual timer
	TIMEVAL m_time;

public:
	// ctor
	CWallClock()
	{
		Restart();
	}

	// retrieve elapsed wall-clock time in micro-seconds
	ULONG ElapsedUS() const override;

	// restart timer
	void Restart() override;
};

}  // namespace gpos

#endif	// !GPOS_CWallClock_H

// EOF

相关信息

greenplumn 源码目录

相关文章

greenplumn CAutoP 源码

greenplumn CAutoRef 源码

greenplumn CAutoRg 源码

greenplumn CAutoTimer 源码

greenplumn CBitSet 源码

greenplumn CBitSetIter 源码

greenplumn CBitVector 源码

greenplumn CDebugCounter 源码

greenplumn CDouble 源码

greenplumn CDynamicPtrArray 源码

0  赞