use of java.lang.Thread in project ACS by ACS-Community.
the class LogStressImpl method logNumTimes.
/////////////////////////////////////////////////////////////
// Implementation of LogStressOperations
/////////////////////////////////////////////////////////////
public void logNumTimes(int numTimes, int delayBetweenLogs) {
m_logger.info("logNumTimes called...");
this.threadDone = false;
this.numTimesToLog = numTimes;
this.delay = delayBetweenLogs;
Thread sendingThread = m_containerServices.getThreadFactory().newThread(new LogSender());
sendingThread.start();
}
use of java.lang.Thread in project jdk8u_jdk by JetBrains.
the class DisplayChangeVITest method main.
public static void main(String[] args) throws Exception {
DisplayChangeVITest test = new DisplayChangeVITest();
GraphicsDevice gd = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice();
if (gd.isFullScreenSupported()) {
gd.setFullScreenWindow(test);
Thread t = new Thread(test);
t.run();
synchronized (lock) {
while (!done) {
try {
lock.wait(50);
} catch (InterruptedException ex) {
ex.printStackTrace();
}
}
}
System.err.println("Test Passed.");
} else {
System.err.println("Full screen not supported. Test passed.");
}
}
use of java.lang.Thread in project android_frameworks_base by DirtyUnicorns.
the class SvcMonitor method startMonitor.
private void startMonitor(Intent intent) {
if (tMonitor != null) {
Log.d(TAG, "thread already active");
return;
}
javaProc = intent.getStringExtra("java");
halProc = intent.getStringExtra("hal");
period = intent.getIntExtra("period", 1000);
if (javaProc == null || halProc == null || period < 100) {
Log.d(TAG, "Failed starting monitor, invalid arguments.");
stopSelf();
return;
}
Runnable monitor = new MonitorRunnable(this);
tMonitor = new Thread(monitor);
tMonitor.start();
}
use of java.lang.Thread in project android_frameworks_base by crdroidandroid.
the class SvcMonitor method startMonitor.
private void startMonitor(Intent intent) {
if (tMonitor != null) {
Log.d(TAG, "thread already active");
return;
}
javaProc = intent.getStringExtra("java");
halProc = intent.getStringExtra("hal");
period = intent.getIntExtra("period", 1000);
if (javaProc == null || halProc == null || period < 100) {
Log.d(TAG, "Failed starting monitor, invalid arguments.");
stopSelf();
return;
}
Runnable monitor = new MonitorRunnable(this);
tMonitor = new Thread(monitor);
tMonitor.start();
}
Aggregations