当前位置: 首页 > news >正文

六安找人做网站1920网页设计尺寸规范

六安找人做网站,1920网页设计尺寸规范,免费一键搭建发卡网,目前主流网站建设软件1. 关键词2. 问题3. 解决思路4. 代码实现 4.1. timecount.h4.2. timecount.cpp 5. 测试代码6. 运行结果7. 源码地址 1. 关键词 C 时间处理 统计函数运行时间 跨平台 2. 问题 C如何简单便捷地实现“函数运行时间的统计”功能#xff1f; 3. 解决思路 类的构造函数#x…1. 关键词2. 问题3. 解决思路4. 代码实现 4.1. timecount.h4.2. timecount.cpp 5. 测试代码6. 运行结果7. 源码地址 1. 关键词 C 时间处理 统计函数运行时间 跨平台 2. 问题 C如何简单便捷地实现“函数运行时间的统计”功能 3. 解决思路 类的构造函数会在对象初始化的时候被调用。类的析构函数会在对象销毁的时候被调用。局部对象的生命周期对象实例化也就是初始化时开始退出作用域时结束。 4. 代码实现 4.1. timecount.h #pragma once#include cstdint #include atomic #include stringnamespace cutl {/*** brief A simple time counter class to measure the execution time of a function.**/class timecount{public:/*** brief Construct a new timecount object* The constructor will record the begin time of the function calling.* param func_name*/timecount(const std::string func_name);/*** brief Destroy the timecount object* The desctructor will record the end time of the function calling and calculate the execution time.*/~timecount();private:std::string func_name_;std::atomicuint64_t start_time_;};} // namespace4.2. timecount.cpp #include timecount.h #include timeutil.h #include strfmt.h #include inner/logger.hnamespace cutl {timecount::timecount(const std::string func_name): func_name_(func_name){start_time_ clocktime(timeunit::us);}timecount::~timecount(){auto end_time clocktime(timeunit::us);auto duration end_time - start_time_;auto text [timecount] func_name_ used fmt_timeduration_us(duration);CUTL_LOGGER.info(, text);} } // namespace5. 测试代码 #pragma once#include iostream #include timecount.h #include common.hppvoid TestTimecount() {PrintTitle(timecount);cutl::timecount tcount(TestTimecount);std::cout TestTimecount begin std::endl;std::this_thread::sleep_for(std::chrono::seconds(1));std::cout TestTimecount end std::endl; }6. 运行结果 timecount TestTimecount begin TestTimecount end [2024-05-19 22:34:35.853][I]]0x7ff844a9b100](cutl) [timecount] TestTimecount used 01s.004955us7. 源码地址 更多详细代码请查看本人写的C 通用工具库: common_util, 本项目已开源代码简洁且有详细的文档和Demo。
http://www.dnsts.com.cn/news/67837.html

相关文章:

  • 免费的网站建设网站内页权重查询
  • 系统网站有哪些英文版wordpress主题
  • 商务网站开发实训报告wordpress 变形
  • 浦东网站开发乐云seo官网
  • 945新开传奇网站网站空间分类
  • 宜春网站推广优化jsp网站怎么运行
  • 安阳网站制作 网络服务河南省网站建设
  • 网站建设投资风险分析html网站开发软件
  • 郑州网站营销汉狮中国服务外包网
  • 建设网站怎么输入分子式佛山做外贸网站咨询
  • 做多语言网站多少钱o2o平台都有哪些网站公司
  • 单页面网站怎么做wordpress初音主题
  • 免费h5在线制作平台广州网站建设方案优化
  • 58同城保定网站建设网站推广有哪些优势
  • 网站图片翻页怎么做临沂企业网站建站模板
  • 做网站有生意吗网站一级域名申请
  • 保定市城乡规划建设局网站建设购物网站需要多少费用
  • 在虚拟主机上建设多个网站长宁免费网站制作
  • 集团网站建设调研报告网站建设 四川
  • O2O网站制作需要多少钱vps如何搭建网站
  • 怎样做农产品交易平台网站怎样建设免费网站
  • 阳光保险网站dede模板打网站显示栏logo
  • 沙坪坝网站建设网站开发持续更新
  • angularjs网站模板百度关键词工具
  • 手机营销网站建设对网页设计作品的意见
  • 登封做网站不需要丢链接可以百度收录的网站
  • 企业网站建设西安wordpress去除
  • 做网站的尺寸1920网络营销与直播电商课程
  • 网站优化怎么弄合肥做网站推广的公司
  • 观澜做网站比较好的公文写作网站