Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
U
uniset2
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
UniSet project repositories
uniset2
Commits
182ac80f
Commit
182ac80f
authored
Aug 08, 2016
by
Pavel Vainerman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Глобально в gettimeofday убрал использование timezone (т.к. не требуется).
parent
7d51a102
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
8 additions
and
16 deletions
+8
-16
DBServer_MySQL.cc
extensions/DBServer-MySQL/DBServer_MySQL.cc
+1
-2
DBServer_SQLite.cc
extensions/DBServer-SQLite/DBServer_SQLite.cc
+1
-2
SharedMemory.h
extensions/SharedMemory/SharedMemory.h
+1
-2
IOController.cc
src/Processes/IOController.cc
+2
-4
IONotifyController.cc
src/Processes/IONotifyController.cc
+2
-4
MessageType.cc
src/Various/MessageType.cc
+1
-2
No files found.
extensions/DBServer-MySQL/DBServer_MySQL.cc
View file @
182ac80f
...
...
@@ -201,8 +201,7 @@ void DBServer_MySQL::sensorInfo( const UniSetTypes::SensorMessage* si )
// если время не было выставлено (указываем время сохранения в БД)
if
(
!
si
->
tm
.
tv_sec
)
{
struct
timezone
tz
;
gettimeofday
(
const_cast
<
struct
timeval
*>
(
&
si
->
tm
),
&
tz
);
gettimeofday
(
const_cast
<
struct
timeval
*>
(
&
si
->
tm
),
NULL
);
}
float
val
=
(
float
)
si
->
value
/
(
float
)
pow10
(
si
->
ci
.
precision
);
...
...
extensions/DBServer-SQLite/DBServer_SQLite.cc
View file @
182ac80f
...
...
@@ -184,8 +184,7 @@ void DBServer_SQLite::sensorInfo( const UniSetTypes::SensorMessage* si )
// если время не было выставлено (указываем время сохранения в БД)
if
(
!
si
->
tm
.
tv_sec
)
{
struct
timezone
tz
;
gettimeofday
(
const_cast
<
struct
timeval
*>
(
&
si
->
tm
),
&
tz
);
gettimeofday
(
const_cast
<
struct
timeval
*>
(
&
si
->
tm
),
NULL
);
}
float
val
=
(
float
)
si
->
value
/
(
float
)
pow10
(
si
->
ci
.
precision
);
...
...
extensions/SharedMemory/SharedMemory.h
View file @
182ac80f
...
...
@@ -358,8 +358,7 @@ class SharedMemory:
fuse_sec
(
0
),
fuse_usec
(
0
)
{
struct
timeval
tv
;
struct
timezone
tz
;
gettimeofday
(
&
tv
,
&
tz
);
gettimeofday
(
&
tv
,
NULL
);
fuse_sec
=
tv
.
tv_sec
;
fuse_usec
=
tv
.
tv_usec
;
}
...
...
src/Processes/IOController.cc
View file @
182ac80f
...
...
@@ -305,10 +305,9 @@ void IOController::localSetValue( std::shared_ptr<USensorInfo>& usi,
// запоминаем время изменения
struct
timeval
tm
=
{
0
};
struct
timezone
tz
;
tm
.
tv_sec
=
0
;
tm
.
tv_usec
=
0
;
gettimeofday
(
&
tm
,
&
tz
);
gettimeofday
(
&
tm
,
NULL
);
usi
->
tv_sec
=
tm
.
tv_sec
;
usi
->
tv_usec
=
tm
.
tv_usec
;
}
...
...
@@ -378,10 +377,9 @@ void IOController::ioRegistration( std::shared_ptr<USensorInfo>& usi, bool force
IOStateList
::
mapped_type
ai
=
usi
;
// запоминаем начальное время
struct
timeval
tm
;
struct
timezone
tz
;
tm
.
tv_sec
=
0
;
tm
.
tv_usec
=
0
;
gettimeofday
(
&
tm
,
&
tz
);
gettimeofday
(
&
tm
,
NULL
);
ai
->
tv_sec
=
tm
.
tv_sec
;
ai
->
tv_usec
=
tm
.
tv_usec
;
ai
->
value
=
ai
->
default_val
;
...
...
src/Processes/IONotifyController.cc
View file @
182ac80f
...
...
@@ -646,10 +646,9 @@ bool IONotifyController::addThreshold( ThresholdExtList& lst, ThresholdInfoExt&&
// запоминаем начальное время
struct
timeval
tm
;
struct
timezone
tz
;
tm
.
tv_sec
=
0
;
tm
.
tv_usec
=
0
;
gettimeofday
(
&
tm
,
&
tz
);
gettimeofday
(
&
tm
,
NULL
);
ti
.
tv_sec
=
tm
.
tv_sec
;
ti
.
tv_usec
=
tm
.
tv_usec
;
...
...
@@ -713,10 +712,9 @@ void IONotifyController::checkThreshold( std::shared_ptr<IOController::USensorIn
// текущее время
struct
timeval
tm
;
struct
timezone
tz
;
tm
.
tv_sec
=
0
;
tm
.
tv_usec
=
0
;
gettimeofday
(
&
tm
,
&
tz
);
gettimeofday
(
&
tm
,
NULL
);
{
uniset_rwmutex_rlock
l
(
ti
->
mut
);
...
...
src/Various/MessageType.cc
View file @
182ac80f
...
...
@@ -56,10 +56,9 @@ namespace UniSetTypes
supplier
(
DefaultObjectId
),
consumer
(
DefaultObjectId
)
{
struct
timezone
tz
;
tm
.
tv_sec
=
0
;
tm
.
tv_usec
=
0
;
gettimeofday
(
&
tm
,
&
tz
);
gettimeofday
(
&
tm
,
NULL
);
}
/*
...
...
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