chrono

    0热度

    1回答

    我正在寻找简单的图书馆为人类可能std::chrono输入/输出。我找到了一个 - chrono_io。输出正常工作。但输入不起作用。 我得到编译时错误error: ‘__scan_keyword’ was not declared in this scope。什么是__scan_keyword? #include <sstream> #include <string> #include <c

    6热度

    1回答

    增量time_point如果我有一个 std::chrono::steady_clock::time_point t1 = std::chrono::steady_clock::now(); 变量,我怎样才能定义另一个time_point可变t2,使得它代表恰好1秒的t1后的时间点? 类似于auto t2 = t1 + "1s"。我应该用什么来取代“1”?

    -1热度

    2回答

    我是新的推动和计时。我正在写一个日志记录器,记录API调用的时间戳,进入和退出。我首先尝试使用boost :: xtime,但没有提供我需要的高分辨率值。因此正在考虑使用Chrono。我声明了一个boost :: chrono :: hight_resolution_clock :: time_stamp x;获取时间戳并将其分配给boost :: chrono :: hight_resoluti

    2热度

    2回答

    所以在过去,我通过std::chrono::duration值引用const,但现在我认为它们不过是一个包装在类中的单一算术类型,所以按值传递它是有意义的。 有没有人配置它?

    2热度

    2回答

    从来就写了下面的函数接收的时间点,并返回与毫秒的ISO字符串: std::string TimePointToISOString(const std::chrono::time_point<std::chrono::system_clock>& time) { std::time_t rawTime = std::chrono::system_clock::to_time_t

    1热度

    1回答

    我试图对Java Card做一些定时攻击。我需要一种方法来测量发送命令和获取答案。我使用的接口是winscard.h,语言是c++。 。我创建了一个包装到winscard.h界面,以便让我的工作更轻松。例如,发送一个APDU现在我使用这个代码似乎工作。 基于this答案,我更新了我的代码 byte pbRecvBuffer[258]; long rv; if (this->sessionHan

    -3热度

    1回答

    我遇到了一个想法,我想用日期和时间记录我的程序正在做什么。所以我编写了一个小函数,在编译时没有错误,没有运行时错误,除非它不打开log.txt,它甚至不会显示日期。 #include <chrono> #include <ctime> #include <fstream> #pragma warning(disable:4996) void log(const char*& text)

    1热度

    3回答

    即使只是想上手,我得到一个错误与此代码: note: candidate template ignored: could not match 'double' against 'long' :: #include <numeric> #include <chrono> using namespace std::chrono_literals; // how to write a fun

    1热度

    4回答

    因此,我们应该将453456秒转换为年,日,小时,分钟和秒。 但是,我似乎无法摆脱过去的岁月。 这是我到目前为止有: #include<iostream> using namespace std; int main(){ int secDis; int years; const int yearsSec = 31536000; int d

    2热度

    1回答

    问题 我正在使用mingw在Windows上使用websocketpp制作一个简单的服务器应用程序。我有我的代码编译和链接成功。然而,当我启动应用程序它给了我下面的错误窗口: The procedure entry point _ZNSt6chrono3_V212steady_clock3nowEv could not be located in the DLL D:\work\wild_web\