Ai
3 Star 4 Fork 1

Gitee 极速下载/REACT-CPP

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/CopernicaMarketingSoftware/REACT-CPP
克隆/下载
timeval.h 973 Bytes
一键复制 编辑 原始数据 按行查看 历史
Martijn Otto 提交于 2014-06-02 17:30 +08:00 . Autofix docblocks
/**
* Timeval.h
*
* Utility class that makes it easy to convert Timestamp times into
* struct timeval objects.
*
* The timeval class is an extended struct timeval
*
* @copyright 2014 Copernica BV
*/
/**
* Set up namespace
*/
namespace React {
/**
* Class definition
*/
class Timeval : public timeval
{
public:
/**
* Default constructor
*/
Timeval()
{
tv_sec = tv_usec = 0;
}
/**
* Constructor to convert from a ev_tstamp value
* @param timestamp ev_tstamp structure
*/
Timeval(Timestamp timestamp)
{
tv_sec = (long)timestamp;
tv_usec = (long)((timestamp - (Timestamp)tv_sec) * 1e6);
}
/**
* Destructor
*/
virtual ~Timeval() {}
/**
* Convert the object to a ev_tstamp value
* @return ev_tstamp
*/
operator Timestamp () const
{
return tv_sec + tv_usec * 1e-6;
}
};
/**
* End namespace
*/
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C/C++
1
https://gitee.com/mirrors/REACT-CPP.git
git@gitee.com:mirrors/REACT-CPP.git
mirrors
REACT-CPP
REACT-CPP
master

搜索帮助