📄 getrandom.cc
字号:
#include "icmp_port_unreach.h"int icmp_port_unreach::getrandom(int limit){ int rnum;#ifdef OpenBSD arc4random(); rnum = 1+arc4random()%limit; return rnum;#endif struct timeval tp; struct timezone tzp; gettimeofday(&tp, &tzp); srand(tp.tv_usec); rnum=1+rand()%limit; return rnum;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -