![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
C/C++
文章平均质量分 50
LS_FIGHTING
这个作者很懒,什么都没留下…
展开
-
struct timeval 和 struct timespec
1. 使用timeval,微秒级(1s = 1 000ms = 1 000 000us = 1 000 000 000ns)struct timeval{ long tv_sec; //seconds long tv_usec; //microseconds}具体应用:#include<time.h>#include<sys/time.h>struct timeval T0,T1;double ellapsedT = 0;gettim原创 2021-10-21 14:19:24 · 519 阅读 · 0 评论 -
使用clock_gettime()每次执行获得的运行时间不一样
struct timespec start, end; //nanosecondsdouble time_gen;time_gen = 0.0;clock_gettime(CLOCK_MONOTONIC, &start);XX_gen(key);clock_gettime(CLOCK_MONOTONIC, &end);time_gen += (double) (1000 * (end.tv_sec - start.tv_sec)) + (double) (end.tv.原创 2021-10-21 08:26:49 · 1135 阅读 · 0 评论 -
error: ‘CLOCK_MONOTONIC‘ undeclared (first use in this function)
错误信息:/home/xx/test/main.c: In function ‘main’:/home/xx/test/main.c:37:21: error: storage size of ‘start’ isn’t known 37 | struct timespec start, end; //nanoseconds | ^~~~~/home/xx/test/main.c:37:28: error: storage siz.原创 2021-10-20 16:01:08 · 1778 阅读 · 0 评论 -
Ubuntu 连接不上网络
lijingyu@ubuntu:~$ sudo service NetworkManager stoplijingyu@ubuntu:~$ sudo rm /var/lib/NetworkManager/NetworkManager.statelijingyu@ubuntu:~$ sudo service NetworkManager start转载 2021-06-25 08:04:31 · 108 阅读 · 0 评论 -
Ubuntu上安装NTL库
1. Downloading and building GF2Xdownload gf2x-master.tar.gz:https://gitlab.inria.fr/gf2x/gf2x#the-gf2x-software-libraryinstallation instruction:https://libntl.org/doc/tour-gf2x.html % gunzip gf2x-master.tar.gz % tar xf gf2x-master.tar % .原创 2021-01-05 20:13:22 · 1192 阅读 · 0 评论 -
INSTALL
InstallIf you downloaded M4RI by cloning the mainline tree athttps://bitbucket.org/malb/m4riyou need to first run the following command:autoreconf --installjingyulee98@LAPTOP-MKCQ9OCP:~$ ...原创 2020-04-25 18:56:12 · 375 阅读 · 0 评论 -
Windows10 WSL安装和配置
一. WSL(Windows Subsystem for Linux)的安装步骤1.设置开发人员模式2.控制面板——程序——程序和功能——启用或关闭Windows功能——勾选适用于Linux的Windows子系统——点击确定3.根据系统提示,将电脑重启4.Microsoft Store——搜索“WSL”——安装Ubuntu 16.04 LTS问题1——关于...原创 2020-04-22 14:36:19 · 3357 阅读 · 2 评论