time moved to util
This commit is contained in:
		| @@ -1,6 +1,7 @@ | |||||||
| #include "./sha1_ngcft1.hpp" | #include "./sha1_ngcft1.hpp" | ||||||
|  |  | ||||||
| #include <solanaceae/util/utils.hpp> | #include <solanaceae/util/utils.hpp> | ||||||
|  | #include <solanaceae/util/time.hpp> | ||||||
|  |  | ||||||
| #include <solanaceae/contact/components.hpp> | #include <solanaceae/contact/components.hpp> | ||||||
| #include <solanaceae/tox_contacts/components.hpp> | #include <solanaceae/tox_contacts/components.hpp> | ||||||
| @@ -1280,7 +1281,7 @@ bool SHA1_NGCFT1::onEvent(const Events::NGCFT1_recv_message& e) { | |||||||
| 		return false; // return true? | 		return false; // return true? | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	uint64_t ts = Message::getTimeMS(); | 	uint64_t ts = getTimeMS(); | ||||||
|  |  | ||||||
| 	const auto c = _tcm.getContactGroupPeer(e.group_number, e.peer_number); | 	const auto c = _tcm.getContactGroupPeer(e.group_number, e.peer_number); | ||||||
| 	_tox_peer_to_contact[combine_ids(e.group_number, e.peer_number)] = c; // workaround | 	_tox_peer_to_contact[combine_ids(e.group_number, e.peer_number)] = c; // workaround | ||||||
| @@ -1355,7 +1356,7 @@ bool SHA1_NGCFT1::sendFilePath(const Contact3 c, std::string_view file_name, std | |||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	// get current time unix epoch utc | 	// get current time unix epoch utc | ||||||
| 	uint64_t ts = Message::getTimeMS(); | 	uint64_t ts = getTimeMS(); | ||||||
|  |  | ||||||
| 	_mfb.newFromFile( | 	_mfb.newFromFile( | ||||||
| 		file_name, file_path, | 		file_name, file_path, | ||||||
|   | |||||||
| @@ -13,6 +13,7 @@ | |||||||
| #include <solanaceae/ngc_ft1_sha1/util.hpp> | #include <solanaceae/ngc_ft1_sha1/util.hpp> | ||||||
|  |  | ||||||
| #include <solanaceae/util/span.hpp> | #include <solanaceae/util/span.hpp> | ||||||
|  | #include <solanaceae/util/time.hpp> | ||||||
|  |  | ||||||
| #include <entt/entity/entity.hpp> | #include <entt/entity/entity.hpp> | ||||||
|  |  | ||||||
| @@ -127,7 +128,7 @@ float NGCHS2Rizzler::iterate(float delta) { | |||||||
| 		const auto [group_number, peer_number] = c.get<Contact::Components::ToxGroupPeerEphemeral>(); | 		const auto [group_number, peer_number] = c.get<Contact::Components::ToxGroupPeerEphemeral>(); | ||||||
|  |  | ||||||
| 		// now in sec | 		// now in sec | ||||||
| 		const uint64_t ts_now = Message::getTimeMS()/1000; | 		const uint64_t ts_now = getTimeMS()/1000; | ||||||
|  |  | ||||||
| 		const uint64_t ts_start = ts_now; | 		const uint64_t ts_start = ts_now; | ||||||
| 		const uint64_t ts_end = ts_now-(60*60*48); | 		const uint64_t ts_end = ts_now-(60*60*48); | ||||||
| @@ -194,7 +195,7 @@ void NGCHS2Rizzler::handleMsgPack(Contact3Handle sync_by_c, const std::vector<ui | |||||||
|  |  | ||||||
| 	Message3Registry& reg = *reg_ptr; | 	Message3Registry& reg = *reg_ptr; | ||||||
|  |  | ||||||
| 	uint64_t now_ts = Message::getTimeMS(); | 	uint64_t now_ts = getTimeMS(); | ||||||
|  |  | ||||||
| 	std::cout << "NGCHS2Rizzler: start parsing msgpack chatlog from " << entt::to_integral(sync_by_c.entity()) << "\n"; | 	std::cout << "NGCHS2Rizzler: start parsing msgpack chatlog from " << entt::to_integral(sync_by_c.entity()) << "\n"; | ||||||
| 	try { | 	try { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user