⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rand_sleep.c

📁 一个C语言写的快速贝叶斯垃圾邮件过滤工具
💻 C
字号:
#include "config.h"#include "system.h"#include "rand_sleep.h"#include <stdlib.h>void rand_sleep(double min, double max){    static bool need_init = true;    long delay;    if (need_init) {	struct timeval timeval;	need_init = false;	gettimeofday(&timeval, NULL);	srand((uint)timeval.tv_usec); /* RATS: ignore - this is safe enough */    }    delay = (int)(min + ((max-min)*rand()/(RAND_MAX+1.0)));    bf_sleep(delay);}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -