Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
abc
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
abc
Commits
13dd754a
Commit
13dd754a
authored
Jun 18, 2013
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Suggested changes to counting time in Abc_Clock()
parent
b91c4165
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
11 deletions
+11
-11
Makefile
+1
-1
src/misc/util/abc_global.h
+10
-10
No files found.
Makefile
View file @
13dd754a
...
@@ -62,7 +62,7 @@ endif
...
@@ -62,7 +62,7 @@ endif
endif
endif
LIBS
:=
-ldl
LIBS
:=
-ldl
-lrt
ifneq
($(READLINE),0)
ifneq
($(READLINE),0)
CFLAGS
+=
-DABC_USE_READLINE
CFLAGS
+=
-DABC_USE_READLINE
...
...
src/misc/util/abc_global.h
View file @
13dd754a
...
@@ -271,18 +271,18 @@ static inline int Abc_Lit2LitL( int * pMap, int Lit ) { return Abc_LitNo
...
@@ -271,18 +271,18 @@ static inline int Abc_Lit2LitL( int * pMap, int Lit ) { return Abc_LitNo
typedef
ABC_INT64_T
abctime
;
typedef
ABC_INT64_T
abctime
;
static
inline
abctime
Abc_Clock
()
static
inline
abctime
Abc_Clock
()
{
{
static
abctime
PeriodNum
=
0
;
#if defined(LIN) || defined(LIN64)
static
clock_t
Period
=
((
abctime
)
1
<<
30
);
struct
timespec
ts
;
clock_t
ClockTime
=
clock
();
if
(
clock_gettime
(
CLOCK_THREAD_CPUTIME_ID
,
&
ts
)
<
0
)
if
(
ClockTime
>=
Period
)
return
(
abctime
)
-
1
;
{
abctime
res
=
((
abctime
)
ts
.
tv_sec
)
*
CLOCKS_PER_SEC
;
ClockTime
-=
Period
;
res
+=
(((
abctime
)
ts
.
tv_nsec
)
*
CLOCKS_PER_SEC
)
/
1000000000
;
PeriodNum
++
;
return
res
;
}
#else
return
PeriodNum
*
Period
+
ClockTime
;
return
(
abctime
)
clock
();
#endif
}
}
// bridge communication
// bridge communication
#define BRIDGE_NETLIST 106
#define BRIDGE_NETLIST 106
#define BRIDGE_ABS_NETLIST 107
#define BRIDGE_ABS_NETLIST 107
...
...
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