util/Time*: move to time/
This commit is contained in:
parent
973c87b351
commit
214ddee2f5
|
@ -300,6 +300,7 @@ if enable_database
|
||||||
endif
|
endif
|
||||||
|
|
||||||
subdir('src/util')
|
subdir('src/util')
|
||||||
|
subdir('src/time')
|
||||||
subdir('src/system')
|
subdir('src/system')
|
||||||
subdir('src/thread')
|
subdir('src/thread')
|
||||||
subdir('src/event')
|
subdir('src/event')
|
||||||
|
|
|
@ -21,8 +21,8 @@
|
||||||
#include "db/PlaylistVector.hxx"
|
#include "db/PlaylistVector.hxx"
|
||||||
#include "fs/io/TextFile.hxx"
|
#include "fs/io/TextFile.hxx"
|
||||||
#include "fs/io/BufferedOutputStream.hxx"
|
#include "fs/io/BufferedOutputStream.hxx"
|
||||||
|
#include "time/ChronoUtil.hxx"
|
||||||
#include "util/StringStrip.hxx"
|
#include "util/StringStrip.hxx"
|
||||||
#include "util/ChronoUtil.hxx"
|
|
||||||
#include "util/RuntimeError.hxx"
|
#include "util/RuntimeError.hxx"
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
#include "TagPrint.hxx"
|
#include "TagPrint.hxx"
|
||||||
#include "client/Response.hxx"
|
#include "client/Response.hxx"
|
||||||
#include "fs/Traits.hxx"
|
#include "fs/Traits.hxx"
|
||||||
#include "util/ChronoUtil.hxx"
|
#include "time/ChronoUtil.hxx"
|
||||||
#include "util/UriUtil.hxx"
|
#include "util/UriUtil.hxx"
|
||||||
|
|
||||||
#define SONG_FILE "file: "
|
#define SONG_FILE "file: "
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
#include "tag/ParseName.hxx"
|
#include "tag/ParseName.hxx"
|
||||||
#include "tag/Tag.hxx"
|
#include "tag/Tag.hxx"
|
||||||
#include "tag/Builder.hxx"
|
#include "tag/Builder.hxx"
|
||||||
#include "util/ChronoUtil.hxx"
|
#include "time/ChronoUtil.hxx"
|
||||||
#include "util/StringAPI.hxx"
|
#include "util/StringAPI.hxx"
|
||||||
#include "util/StringBuffer.hxx"
|
#include "util/StringBuffer.hxx"
|
||||||
#include "util/StringStrip.hxx"
|
#include "util/StringStrip.hxx"
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
#include "db/Stats.hxx"
|
#include "db/Stats.hxx"
|
||||||
#include "system/Clock.hxx"
|
#include "system/Clock.hxx"
|
||||||
#include "Log.hxx"
|
#include "Log.hxx"
|
||||||
#include "util/ChronoUtil.hxx"
|
#include "time/ChronoUtil.hxx"
|
||||||
|
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
|
|
||||||
#include "TimePrint.hxx"
|
#include "TimePrint.hxx"
|
||||||
#include "client/Response.hxx"
|
#include "client/Response.hxx"
|
||||||
#include "util/TimeISO8601.hxx"
|
#include "time/ISO8601.hxx"
|
||||||
|
|
||||||
void
|
void
|
||||||
time_print(Response &r, const char *name,
|
time_print(Response &r, const char *name,
|
||||||
|
|
|
@ -35,7 +35,7 @@
|
||||||
#include "decoder/DecoderPrint.hxx"
|
#include "decoder/DecoderPrint.hxx"
|
||||||
#include "ls.hxx"
|
#include "ls.hxx"
|
||||||
#include "mixer/Volume.hxx"
|
#include "mixer/Volume.hxx"
|
||||||
#include "util/ChronoUtil.hxx"
|
#include "time/ChronoUtil.hxx"
|
||||||
#include "util/UriUtil.hxx"
|
#include "util/UriUtil.hxx"
|
||||||
#include "util/StringAPI.hxx"
|
#include "util/StringAPI.hxx"
|
||||||
#include "fs/AllocatedPath.hxx"
|
#include "fs/AllocatedPath.hxx"
|
||||||
|
|
|
@ -38,9 +38,9 @@
|
||||||
#include "client/Response.hxx"
|
#include "client/Response.hxx"
|
||||||
#include "Mapper.hxx"
|
#include "Mapper.hxx"
|
||||||
#include "fs/AllocatedPath.hxx"
|
#include "fs/AllocatedPath.hxx"
|
||||||
|
#include "time/ChronoUtil.hxx"
|
||||||
#include "util/UriUtil.hxx"
|
#include "util/UriUtil.hxx"
|
||||||
#include "util/ConstBuffer.hxx"
|
#include "util/ConstBuffer.hxx"
|
||||||
#include "util/ChronoUtil.hxx"
|
|
||||||
#include "LocateUri.hxx"
|
#include "LocateUri.hxx"
|
||||||
|
|
||||||
bool
|
bool
|
||||||
|
|
|
@ -23,8 +23,8 @@
|
||||||
#include "StorageCommands.hxx"
|
#include "StorageCommands.hxx"
|
||||||
#include "Request.hxx"
|
#include "Request.hxx"
|
||||||
#include "CommandError.hxx"
|
#include "CommandError.hxx"
|
||||||
|
#include "time/ChronoUtil.hxx"
|
||||||
#include "util/UriUtil.hxx"
|
#include "util/UriUtil.hxx"
|
||||||
#include "util/ChronoUtil.hxx"
|
|
||||||
#include "util/ConstBuffer.hxx"
|
#include "util/ConstBuffer.hxx"
|
||||||
#include "fs/Traits.hxx"
|
#include "fs/Traits.hxx"
|
||||||
#include "client/Client.hxx"
|
#include "client/Client.hxx"
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
#include "PlaylistInfo.hxx"
|
#include "PlaylistInfo.hxx"
|
||||||
#include "Interface.hxx"
|
#include "Interface.hxx"
|
||||||
#include "fs/Traits.hxx"
|
#include "fs/Traits.hxx"
|
||||||
#include "util/ChronoUtil.hxx"
|
#include "time/ChronoUtil.hxx"
|
||||||
|
|
||||||
#include <functional>
|
#include <functional>
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
#include "PlaylistDatabase.hxx"
|
#include "PlaylistDatabase.hxx"
|
||||||
#include "fs/io/TextFile.hxx"
|
#include "fs/io/TextFile.hxx"
|
||||||
#include "fs/io/BufferedOutputStream.hxx"
|
#include "fs/io/BufferedOutputStream.hxx"
|
||||||
#include "util/ChronoUtil.hxx"
|
#include "time/ChronoUtil.hxx"
|
||||||
#include "util/StringCompare.hxx"
|
#include "util/StringCompare.hxx"
|
||||||
#include "util/NumberParser.hxx"
|
#include "util/NumberParser.hxx"
|
||||||
#include "util/RuntimeError.hxx"
|
#include "util/RuntimeError.hxx"
|
||||||
|
|
|
@ -29,8 +29,9 @@
|
||||||
#include "AudioParser.hxx"
|
#include "AudioParser.hxx"
|
||||||
#include "tag/ParseName.hxx"
|
#include "tag/ParseName.hxx"
|
||||||
#include "tag/Tag.hxx"
|
#include "tag/Tag.hxx"
|
||||||
|
#include "time/ChronoUtil.hxx"
|
||||||
|
#include "time/ISO8601.hxx"
|
||||||
#include "util/CharUtil.hxx"
|
#include "util/CharUtil.hxx"
|
||||||
#include "util/ChronoUtil.hxx"
|
|
||||||
#include "util/ConstBuffer.hxx"
|
#include "util/ConstBuffer.hxx"
|
||||||
#include "util/RuntimeError.hxx"
|
#include "util/RuntimeError.hxx"
|
||||||
#include "util/StringAPI.hxx"
|
#include "util/StringAPI.hxx"
|
||||||
|
@ -38,7 +39,6 @@
|
||||||
#include "util/StringStrip.hxx"
|
#include "util/StringStrip.hxx"
|
||||||
#include "util/StringView.hxx"
|
#include "util/StringView.hxx"
|
||||||
#include "util/ASCII.hxx"
|
#include "util/ASCII.hxx"
|
||||||
#include "util/TimeISO8601.hxx"
|
|
||||||
#include "util/UriUtil.hxx"
|
#include "util/UriUtil.hxx"
|
||||||
#include "lib/icu/CaseFold.hxx"
|
#include "lib/icu/CaseFold.hxx"
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
|
|
||||||
#include "ModifiedSinceSongFilter.hxx"
|
#include "ModifiedSinceSongFilter.hxx"
|
||||||
#include "LightSong.hxx"
|
#include "LightSong.hxx"
|
||||||
#include "util/TimeISO8601.hxx"
|
#include "time/ISO8601.hxx"
|
||||||
|
|
||||||
std::string
|
std::string
|
||||||
ModifiedSinceSongFilter::ToExpression() const noexcept
|
ModifiedSinceSongFilter::ToExpression() const noexcept
|
||||||
|
|
|
@ -24,6 +24,7 @@ song_dep = declare_dependency(
|
||||||
icu_dep,
|
icu_dep,
|
||||||
pcre_dep,
|
pcre_dep,
|
||||||
tag_dep,
|
tag_dep,
|
||||||
|
time_dep,
|
||||||
util_dep,
|
util_dep,
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
|
@ -33,13 +33,13 @@
|
||||||
#include "event/DeferEvent.hxx"
|
#include "event/DeferEvent.hxx"
|
||||||
#include "thread/Mutex.hxx"
|
#include "thread/Mutex.hxx"
|
||||||
#include "thread/Cond.hxx"
|
#include "thread/Cond.hxx"
|
||||||
|
#include "time/ChronoUtil.hxx"
|
||||||
|
#include "time/Parser.hxx"
|
||||||
#include "util/ASCII.hxx"
|
#include "util/ASCII.hxx"
|
||||||
#include "util/ChronoUtil.hxx"
|
|
||||||
#include "util/IterableSplitString.hxx"
|
#include "util/IterableSplitString.hxx"
|
||||||
#include "util/RuntimeError.hxx"
|
#include "util/RuntimeError.hxx"
|
||||||
#include "util/StringCompare.hxx"
|
#include "util/StringCompare.hxx"
|
||||||
#include "util/StringFormat.hxx"
|
#include "util/StringFormat.hxx"
|
||||||
#include "util/TimeParser.hxx"
|
|
||||||
#include "util/UriUtil.hxx"
|
#include "util/UriUtil.hxx"
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
|
@ -57,5 +57,6 @@ storage_plugins_dep = declare_dependency(
|
||||||
dependencies: [
|
dependencies: [
|
||||||
storage_api_dep,
|
storage_api_dep,
|
||||||
fs_dep,
|
fs_dep,
|
||||||
|
time_dep,
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
|
@ -20,9 +20,9 @@
|
||||||
#include "Format.hxx"
|
#include "Format.hxx"
|
||||||
#include "Tag.hxx"
|
#include "Tag.hxx"
|
||||||
#include "ParseName.hxx"
|
#include "ParseName.hxx"
|
||||||
|
#include "time/Convert.hxx"
|
||||||
#include "util/format.h"
|
#include "util/format.h"
|
||||||
#include "util/TruncateString.hxx"
|
#include "util/TruncateString.hxx"
|
||||||
#include "util/TimeConvert.hxx"
|
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
|
|
|
@ -45,6 +45,7 @@ tag = static_library(
|
||||||
tag_dep = declare_dependency(
|
tag_dep = declare_dependency(
|
||||||
link_with: tag,
|
link_with: tag,
|
||||||
dependencies: [
|
dependencies: [
|
||||||
|
time_dep,
|
||||||
util_dep,
|
util_dep,
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "TimeConvert.hxx"
|
#include "Convert.hxx"
|
||||||
|
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
|
|
|
@ -30,9 +30,9 @@
|
||||||
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "TimeISO8601.hxx"
|
#include "ISO8601.hxx"
|
||||||
#include "TimeConvert.hxx"
|
#include "Convert.hxx"
|
||||||
#include "TimeParser.hxx"
|
#include "Parser.hxx"
|
||||||
|
|
||||||
StringBuffer<64>
|
StringBuffer<64>
|
||||||
FormatISO8601(const struct tm &tm) noexcept
|
FormatISO8601(const struct tm &tm) noexcept
|
|
@ -33,8 +33,8 @@
|
||||||
#ifndef TIME_ISO8601_HXX
|
#ifndef TIME_ISO8601_HXX
|
||||||
#define TIME_ISO8601_HXX
|
#define TIME_ISO8601_HXX
|
||||||
|
|
||||||
#include "StringBuffer.hxx"
|
#include "util/StringBuffer.hxx"
|
||||||
#include "Compiler.h"
|
#include "util/Compiler.h"
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <chrono>
|
#include <chrono>
|
|
@ -27,8 +27,8 @@
|
||||||
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "TimeParser.hxx"
|
#include "Parser.hxx"
|
||||||
#include "Compiler.h"
|
#include "util/Compiler.h"
|
||||||
|
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
time = static_library(
|
||||||
|
'time',
|
||||||
|
'Parser.cxx',
|
||||||
|
'Convert.cxx',
|
||||||
|
'ISO8601.cxx',
|
||||||
|
include_directories: inc,
|
||||||
|
)
|
||||||
|
|
||||||
|
time_dep = declare_dependency(
|
||||||
|
link_with: time,
|
||||||
|
)
|
|
@ -16,9 +16,6 @@ util = static_library(
|
||||||
'SplitString.cxx',
|
'SplitString.cxx',
|
||||||
'FormatString.cxx',
|
'FormatString.cxx',
|
||||||
'Tokenizer.cxx',
|
'Tokenizer.cxx',
|
||||||
'TimeParser.cxx',
|
|
||||||
'TimeConvert.cxx',
|
|
||||||
'TimeISO8601.cxx',
|
|
||||||
'UriUtil.cxx',
|
'UriUtil.cxx',
|
||||||
'LazyRandomEngine.cxx',
|
'LazyRandomEngine.cxx',
|
||||||
'HugeAllocator.cxx',
|
'HugeAllocator.cxx',
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
#include "storage/StorageInterface.hxx"
|
#include "storage/StorageInterface.hxx"
|
||||||
#include "storage/FileInfo.hxx"
|
#include "storage/FileInfo.hxx"
|
||||||
#include "net/Init.hxx"
|
#include "net/Init.hxx"
|
||||||
#include "util/ChronoUtil.hxx"
|
#include "time/ChronoUtil.hxx"
|
||||||
#include "util/PrintException.hxx"
|
#include "util/PrintException.hxx"
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
#include "storage/StorageInterface.hxx"
|
#include "storage/StorageInterface.hxx"
|
||||||
#include "storage/plugins/LocalStorage.hxx"
|
#include "storage/plugins/LocalStorage.hxx"
|
||||||
#include "Mapper.hxx"
|
#include "Mapper.hxx"
|
||||||
#include "util/ChronoUtil.hxx"
|
#include "time/ChronoUtil.hxx"
|
||||||
|
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue