Tidying
This commit is contained in:
@@ -96,4 +96,14 @@ XXH64_hash_t hash_directory_recursive(const std::string &path) {
|
||||
return hash;
|
||||
}
|
||||
|
||||
void hash_demo(const std::string & path)
|
||||
{
|
||||
std::cout << "Hashing directory: " << path << std::endl;
|
||||
auto start = std::chrono::high_resolution_clock::now();
|
||||
XXH64_hash_t hash = hash_directory_recursive(path);
|
||||
auto end = std::chrono::high_resolution_clock::now();
|
||||
auto duration = std::chrono::duration_cast<std::chrono::milliseconds>(end - start);
|
||||
std::cout << "Hash: " << hash << " (took " << duration.count() << "ms)" << std::endl;
|
||||
}
|
||||
|
||||
} // namespace dropshell
|
||||
|
@@ -10,6 +10,8 @@ namespace dropshell {
|
||||
|
||||
XXH64_hash_t hash_directory_recursive(const std::string &path);
|
||||
|
||||
void hash_demo(const std::string & path);
|
||||
|
||||
} // namespace dropshell
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user