Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F21908338
clientutil.cpp
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Size
666 B
Referenced Files
None
Subscribers
None
clientutil.cpp
View Options
/*
* This file is part of libkazv.
* SPDX-FileCopyrightText: 2021-2023 tusooa <tusooa@kazv.moe>
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
#include
<libkazv-config.hpp>
#include
"client-model.hpp"
#include
"clientutil.hpp"
namespace
Kazv
{
std
::
string
increaseTxnId
(
std
::
string
cur
)
{
return
std
::
to_string
(
std
::
stoull
(
cur
)
+
1
);
}
std
::
string
getTxnId
(
Event
/* event */
,
ClientModel
&
m
)
{
auto
txnId
=
std
::
to_string
(
std
::
chrono
::
system_clock
::
now
()
.
time_since_epoch
().
count
())
+
m
.
nextTxnId
;
m
.
nextTxnId
=
increaseTxnId
(
m
.
nextTxnId
);
return
txnId
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-c++
Expires
Sun, Dec 28, 1:43 AM (6 h, 53 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
697523
Default Alt Text
clientutil.cpp (666 B)
Attached To
Mode
rL libkazv
Attached
Detach File
Event Timeline
Log In to Comment