Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
Grpc
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tci-gateway-module
Grpc
Commits
5de37830
Commit
5de37830
authored
10 years ago
by
Craig Tiller
Browse files
Options
Downloads
Plain Diff
Merge pull request #392 from dklempner/timeval
Remove timeval functions
parents
885104b2
c15622b9
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
include/grpc/support/time.h
+0
-4
0 additions, 4 deletions
include/grpc/support/time.h
src/core/support/time.c
+0
-16
0 additions, 16 deletions
src/core/support/time.c
src/node/ext/timeval.cc
+2
-3
2 additions, 3 deletions
src/node/ext/timeval.cc
with
2 additions
and
23 deletions
include/grpc/support/time.h
+
0
−
4
View file @
5de37830
...
...
@@ -103,10 +103,6 @@ int gpr_time_similar(gpr_timespec a, gpr_timespec b, gpr_timespec threshold);
/* Sleep until at least 'until' - an absolute timeout */
void
gpr_sleep_until
(
gpr_timespec
until
);
struct
timeval
gpr_timeval_from_timespec
(
gpr_timespec
t
);
gpr_timespec
gpr_timespec_from_timeval
(
struct
timeval
t
);
double
gpr_timespec_to_micros
(
gpr_timespec
t
);
#ifdef __cplusplus
...
...
This diff is collapsed.
Click to expand it.
src/core/support/time.c
+
0
−
16
View file @
5de37830
...
...
@@ -234,22 +234,6 @@ int gpr_time_similar(gpr_timespec a, gpr_timespec b, gpr_timespec threshold) {
}
}
struct
timeval
gpr_timeval_from_timespec
(
gpr_timespec
t
)
{
/* TODO(klempner): Consider whether this should round up, since it is likely
to be used for delays */
struct
timeval
tv
;
tv
.
tv_sec
=
t
.
tv_sec
;
tv
.
tv_usec
=
t
.
tv_nsec
/
1000
;
return
tv
;
}
gpr_timespec
gpr_timespec_from_timeval
(
struct
timeval
t
)
{
gpr_timespec
ts
;
ts
.
tv_sec
=
t
.
tv_sec
;
ts
.
tv_nsec
=
t
.
tv_usec
*
1000
;
return
ts
;
}
gpr_int32
gpr_time_to_millis
(
gpr_timespec
t
)
{
if
(
t
.
tv_sec
>=
2147483
)
{
if
(
t
.
tv_sec
==
2147483
&&
t
.
tv_nsec
<
648
*
GPR_NS_PER_MS
)
{
...
...
This diff is collapsed.
Click to expand it.
src/node/ext/timeval.cc
+
2
−
3
View file @
5de37830
...
...
@@ -56,9 +56,8 @@ double TimespecToMilliseconds(gpr_timespec timespec) {
}
else
if
(
gpr_time_cmp
(
timespec
,
gpr_inf_past
)
==
0
)
{
return
-
std
::
numeric_limits
<
double
>::
infinity
();
}
else
{
struct
timeval
time
=
gpr_timeval_from_timespec
(
timespec
);
return
(
static_cast
<
double
>
(
time
.
tv_sec
)
*
1000
+
static_cast
<
double
>
(
time
.
tv_usec
)
/
1000
);
return
(
static_cast
<
double
>
(
timespec
.
tv_sec
)
*
1000
+
static_cast
<
double
>
(
timespec
.
tv_nsec
)
/
1000000
);
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment