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];
|
char tmp[16];
|
||||||
struct tm *mytm;
|
struct tm *mytm;
|
||||||
|
time_t t;
|
||||||
struct timeval tv;
|
struct timeval tv;
|
||||||
gettimeofday(&tv, NULL);
|
t = time(NULL);
|
||||||
mytm = gmtime(&tv.tv_sec);
|
mytm = gmtime(&t);
|
||||||
strftime(buf, buflen, "%Y-%m-%d:%H:%M:%S.", mytm);
|
strftime(buf, buflen, "%Y-%m-%d:%H:%M:%S.", mytm);
|
||||||
|
gettimeofday(&tv, NULL);
|
||||||
sprintf(tmp, "%06ld", (long)tv.tv_usec);
|
sprintf(tmp, "%06ld", (long)tv.tv_usec);
|
||||||
strcat(buf, tmp);
|
strcat(buf, tmp);
|
||||||
return buf;
|
return buf;
|
||||||
|
|
Ładowanie…
Reference in New Issue