Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: d0c2fa41b23110c92bcaa769a85fdf4be223387f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/*******************************************************************************
 * Copyright (c) 2015 Christian Pontesegger and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:	Christian Pontesegger - initial API and implementation
 *******************************************************************************/

var formatter = java.text.SimpleDateFormat("yyyy-MM-dd, HH:mm:ss")
time = formatter.format(java.lang.System.currentTimeMillis());

// change application title
loadModule('/System/UI');
executeUI('getShell().setText("' + time + '")');

// sleep 1s
java.lang.Thread.sleep(1000);

// restart script
loadModule('/System/Scripting');
fork(getScriptEngine().getExecutedFile());

Back to the top