Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
Widget
Project
Project
Details
Activity
Releases
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
Android Widget
Widget
Commits
b632147d
Commit
b632147d
authored
Jul 22, 2021
by
gaoyingxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改定时器
parent
1a1aa7f5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
0 deletions
+9
-0
RxTimerUtil.java
.../src/main/java/com/zhimai/websocket/util/RxTimerUtil.java
+8
-0
SysCode.java
...cket/src/main/java/com/zhimai/websocket/util/SysCode.java
+1
-0
No files found.
websocket/src/main/java/com/zhimai/websocket/util/RxTimerUtil.java
View file @
b632147d
...
@@ -19,6 +19,7 @@ public class RxTimerUtil {
...
@@ -19,6 +19,7 @@ public class RxTimerUtil {
private
static
Disposable
mDisposableTime
;
private
static
Disposable
mDisposableTime
;
private
static
Disposable
mDisposableSocket
;
private
static
Disposable
mDisposableSocket
;
private
static
Disposable
mDisposablepPrint
;
private
static
Disposable
mDisposablepPrint
;
private
static
Disposable
mDisposableOther
;
/**
/**
* milliseconds毫秒后执行next操作
* milliseconds毫秒后执行next操作
...
@@ -81,6 +82,8 @@ public class RxTimerUtil {
...
@@ -81,6 +82,8 @@ public class RxTimerUtil {
case
SysCode
.
RX_TIMER_TYPE
.
PRINT
:
case
SysCode
.
RX_TIMER_TYPE
.
PRINT
:
mDisposablepPrint
=
disposable
;
mDisposablepPrint
=
disposable
;
break
;
break
;
case
SysCode
.
RX_TIMER_TYPE
.
OTHER
:
mDisposableOther
=
disposable
;
}
}
}
}
...
@@ -127,6 +130,11 @@ public class RxTimerUtil {
...
@@ -127,6 +130,11 @@ public class RxTimerUtil {
Log
.
e
(
TAG
,
"====定时器取消mDisposablepPrint======"
);
Log
.
e
(
TAG
,
"====定时器取消mDisposablepPrint======"
);
}
}
break
;
break
;
case
SysCode
.
RX_TIMER_TYPE
.
OTHER
:
if
(
mDisposableOther
!=
null
&&
!
mDisposableOther
.
isDisposed
())
{
mDisposableOther
.
dispose
();
Log
.
e
(
TAG
,
"====定时器取消mDisposableOther======"
);
}
}
}
}
}
...
...
websocket/src/main/java/com/zhimai/websocket/util/SysCode.java
View file @
b632147d
...
@@ -12,6 +12,7 @@ public class SysCode {
...
@@ -12,6 +12,7 @@ public class SysCode {
int
TIME
=
0
;
int
TIME
=
0
;
int
SOCKET
=
1
;
int
SOCKET
=
1
;
int
PRINT
=
2
;
int
PRINT
=
2
;
int
OTHER
=
3
;
}
}
}
}
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