Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
U
UERANSIM
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
UERANSIM
Commits
7b3fbc85
Commit
7b3fbc85
authored
May 17, 2021
by
aligungr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
L3 RRC/NAS developments
parent
0d8eed32
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
15 deletions
+1
-15
src/lib/nas/storage.hpp
src/lib/nas/storage.hpp
+1
-15
No files found.
src/lib/nas/storage.hpp
View file @
7b3fbc85
...
...
@@ -18,7 +18,6 @@ namespace nas
* - Items are unique, if already exists, deletes the previous one
* - List have fixed size, if capacity is full, oldest item is deleted
* - Automatically cleared after specified period
* - Can be asked if it has a changes after the last one
*/
template
<
typename
T
>
class
NasListT1
...
...
@@ -30,13 +29,11 @@ class NasListT1
std
::
vector
<
T
>
m_data
;
size_t
m_size
;
int64_t
m_lastAutoCleared
;
int64_t
m_lastChange
;
int64_t
m_lastChangeQueried
;
public:
NasListT1
(
size_t
sizeLimit
,
int64_t
autoClearingPeriod
)
:
m_sizeLimit
{
sizeLimit
},
m_autoClearingPeriod
{
autoClearingPeriod
},
m_data
{
sizeLimit
},
m_size
{},
m_lastAutoCleared
{
::
utils
::
CurrentTimeMillis
()}
,
m_lastChange
{},
m_lastChangeQueried
{}
m_lastAutoCleared
{
::
utils
::
CurrentTimeMillis
()}
{
}
...
...
@@ -132,16 +129,6 @@ class NasListT1
return
m_data
.
size
();
}
bool
hasChange
()
{
if
(
m_lastChangeQueried
==
0
||
m_lastChangeQueried
!=
m_lastChange
)
{
m_lastChangeQueried
=
m_lastChange
;
return
true
;
}
return
false
;
}
private:
void
autoClearIfNecessary
()
{
...
...
@@ -170,7 +157,6 @@ class NasListT1
void
touch
()
{
m_lastChange
=
utils
::
CurrentTimeMillis
();
}
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment