学习到了 常用函数 system

This commit is contained in:
lzy
2024-05-26 08:24:54 +08:00
parent 6f754aa23d
commit 6f28a3384a
16 changed files with 1066 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
/***********************************************************************
* @file mytbf.h
* @brief
* 令牌桶库
*
* @author lzy (lllzzzyyy@buaa.edu.cn)
* @url https://lzyyyyyy.fun
*
* @date 2024-05-26
*
***********************************************************************/
#ifndef __MYTBF__H__
#define __MYTBF__H__
#define MYTBF_MAX 1024
typedef void mytbf_t;
mytbf_t *mytbf_init(int cps, int burst);
int mytbf_fetchtoken(mytbf_t *, int);
int mytbf_returntoken(mytbf_t *, int);
int mytbf_destroy(mytbf_t *);
#endif //!__MYTBF__H__