Replaced tabs with spaces

This commit is contained in:
2020-06-17 11:54:09 +02:00
parent e4a3383b1f
commit 8a7b381d63
21 changed files with 1617 additions and 1617 deletions

View File

@ -7,26 +7,26 @@
#include "Http.h"
unsigned long getMicros() {
struct timeval tv;
gettimeofday(&tv, nullptr);
return (unsigned long) (1000000 * tv.tv_sec + tv.tv_usec);
struct timeval tv;
gettimeofday(&tv, nullptr);
return (unsigned long) (1000000 * tv.tv_sec + tv.tv_usec);
}
string getHttpDate() {
time_t rawtime;
time(&rawtime);
return getHttpDate(rawtime);
time_t rawtime;
time(&rawtime);
return getHttpDate(rawtime);
}
string getHttpDate(string filename) {
struct stat attrib;
stat(filename.c_str(), &attrib);
return getHttpDate(attrib.st_ctime);
struct stat attrib;
stat(filename.c_str(), &attrib);
return getHttpDate(attrib.st_ctime);
}
string getHttpDate(time_t time) {
char buffer[64];
struct tm *timeinfo = gmtime(&time);
strftime(buffer, sizeof(buffer), "%a, %d %b %Y %H:%M:%S GMT", timeinfo);
return string(buffer);
char buffer[64];
struct tm *timeinfo = gmtime(&time);
strftime(buffer, sizeof(buffer), "%a, %d %b %Y %H:%M:%S GMT", timeinfo);
return string(buffer);
}