aboutsummaryrefslogtreecommitdiff
path: root/launcher/net/Download.h
diff options
context:
space:
mode:
authorRachel Powers <508861+Ryex@users.noreply.github.com>2023-05-12 01:13:17 -0700
committerGitHub <noreply@github.com>2023-05-12 01:13:17 -0700
commit6b6d6a01dc9cf05715f01e3a549740b169ef9ae3 (patch)
tree8ba9746a188c39003213839825552543e3f1a48f /launcher/net/Download.h
parentf27716656c6f6006238203669a7a02f035733fc0 (diff)
parentc5aff7cc1ef43a1326bd3ce0c83e29669e2ff43f (diff)
downloadPrismLauncher-6b6d6a01dc9cf05715f01e3a549740b169ef9ae3.tar.gz
PrismLauncher-6b6d6a01dc9cf05715f01e3a549740b169ef9ae3.tar.bz2
PrismLauncher-6b6d6a01dc9cf05715f01e3a549740b169ef9ae3.zip
Merge branch 'develop' into fix/network_and_signals
Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
Diffstat (limited to 'launcher/net/Download.h')
-rw-r--r--launcher/net/Download.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/launcher/net/Download.h b/launcher/net/Download.h
index 01ec46db..920164a3 100644
--- a/launcher/net/Download.h
+++ b/launcher/net/Download.h
@@ -1,8 +1,9 @@
// SPDX-License-Identifier: GPL-3.0-only
/*
- * PolyMC - Minecraft Launcher
+ * Prism Launcher - Minecraft Launcher
* Copyright (c) 2022 flowln <flowlnlnln@gmail.com>
* Copyright (C) 2022 Sefa Eyeoglu <contact@scrumplex.net>
+ * Copyright (C) 2023 Rachel Powers <508861+Ryex@users.noreply.github.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -22,6 +23,7 @@
* Copyright 2013-2021 MultiMC Contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
+
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
@@ -36,6 +38,8 @@
#pragma once
+#include <chrono>
+
#include "HttpMetaCache.h"
#include "NetAction.h"
#include "Sink.h"
@@ -80,6 +84,10 @@ class Download : public NetAction {
private:
std::unique_ptr<Sink> m_sink;
Options m_options;
+
+ std::chrono::steady_clock m_clock;
+ std::chrono::time_point<std::chrono::steady_clock> m_last_progress_time;
+ qint64 m_last_progress_bytes;
};
} // namespace Net