📄 usetime.java
字号:
package com.sam.net.download;
class UseTime implements Runnable
{
int time;
FormatTime formattime;
String usetime;
boolean status;
public UseTime(int status)
{
time = 0;
formattime = new FormatTime();
if (status == 0)
this.status = true;
else
this.status = false;
}
public void run()
{
while (status)
{
usetime = formattime.changTime(time);
time++;
try
{
Thread.sleep(1000L);
}
catch (InterruptedException e)
{
e.printStackTrace();
}
}
}
public String getUseTime()
{
return usetime;
}
public void getStatus(int status)
{
if (status == 0)
this.status = true;
else
this.status = false;
}
public void start(int status)
{
Thread thread = new Thread(this);
if (status == 0)
this.status = true;
else
this.status = false;
thread.start();
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -