kopia lustrzana https://github.com/Hamlib/Hamlib
rodzic
e4b571af0d
commit
5639d49e48
|
@ -150,10 +150,12 @@ char *date_strget(char *buf, int buflen)
|
|||
{
|
||||
char tmp[16];
|
||||
struct tm *mytm;
|
||||
time_t t;
|
||||
struct timeval tv;
|
||||
gettimeofday(&tv, NULL);
|
||||
mytm = gmtime(&tv.tv_sec);
|
||||
t = time(NULL);
|
||||
mytm = gmtime(&t);
|
||||
strftime(buf, buflen, "%Y-%m-%d:%H:%M:%S.", mytm);
|
||||
gettimeofday(&tv, NULL);
|
||||
sprintf(tmp, "%06ld", (long)tv.tv_usec);
|
||||
strcat(buf, tmp);
|
||||
return buf;
|
||||
|
|
Ładowanie…
Reference in New Issue