mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
removed unused function
This commit is contained in:
parent
d9137790a3
commit
2293e3ad4a
2 changed files with 0 additions and 33 deletions
|
@ -138,10 +138,6 @@ char * vstrcatf(char **dest, const char *fmt, va_list va)
|
|||
#define strf(fmt, ...) strcatf(&(char *) { NULL }, fmt, ##__VA_ARGS__)
|
||||
#define vstrf(fmt, va) vstrcatf(&(char *) { NULL }, fmt, va)
|
||||
|
||||
/** Format a struct timespec date similar to strftime() */
|
||||
int strftimespec(char *s, size_t max, const char *format, struct timespec *ts)
|
||||
__attribute__ ((format(strftime, 3, 0)));
|
||||
|
||||
/** Convert integer to cpu_set_t.
|
||||
*
|
||||
* @param set An integer number which is used as the mask
|
||||
|
|
29
lib/utils.c
29
lib/utils.c
|
@ -38,35 +38,6 @@ int version_cmp(struct version *a, struct version *b) {
|
|||
return major ? major : minor;
|
||||
}
|
||||
|
||||
int strftimespec(char *dst, size_t max, const char *fmt, struct timespec *ts)
|
||||
{
|
||||
int s, d;
|
||||
char fmt2[64], dst2[64];
|
||||
|
||||
for (s=0, d=0; fmt[s] && d < 64;) {
|
||||
char c = fmt2[d++] = fmt[s++];
|
||||
if (c == '%') {
|
||||
char n = fmt[s];
|
||||
if (n == 'u') {
|
||||
fmt2[d++] = '0';
|
||||
fmt2[d++] = '3';
|
||||
}
|
||||
else
|
||||
fmt2[d++] = '%';
|
||||
}
|
||||
}
|
||||
|
||||
/* Print sub-second part to format string */
|
||||
snprintf(dst2, sizeof(dst2), fmt2, ts->tv_nsec / 1000000);
|
||||
|
||||
/* Print timestamp */
|
||||
struct tm tm;
|
||||
if (localtime_r(&(ts->tv_sec), &tm) == NULL)
|
||||
return -1;
|
||||
|
||||
return strftime(dst, max, dst2, &tm);
|
||||
}
|
||||
|
||||
double box_muller(float m, float s)
|
||||
{
|
||||
double x1, x2, y1;
|
||||
|
|
Loading…
Add table
Reference in a new issue