Compare commits

..

No commits in common. "c7e4baee7ed3781c303389609a04c3b7f1b45e4e" and "839f2fd6a78e1fefbb1e058c80557bcb5c715e91" have entirely different histories.

3 changed files with 0 additions and 70 deletions

View File

@ -1,15 +0,0 @@
#/!bin/bash
let "interval=30"
start=$(date +"%s")
# do something
end=$(date +"%s")
let "timeTaken=end-start"
let "timeToSleep=interval-timeTaken"
if [ $timeToSleep -gt 0 ]
then
echo "sleep for $timeToSleep sec"
sleep $timeToSleep
fi

View File

@ -1,41 +0,0 @@
/**
* Read ASCII file for Java > 6
*/
private String readFile(String filePath) {
String ret = "";
try (BufferedReader buff = new BufferedReader(new FileReader(filePath))) {
String line;
while ((line = buff.readLine()) != null) {
ret += line;
}
} catch (FileNotFoundException ex) {
Logger.getLogger(Plugin.class.getName()).log(Level.SEVERE, null, ex);
} catch (IOException ex) {
Logger.getLogger(Plugin.class.getName()).log(Level.SEVERE, null, ex);
}
return ret;
}
/**
* Read ASCII file for Java <= 6
*/
private String readFile(String filePath) {
String ret = "";
try{
BufferedReader buff = new BufferedReader(new FileReader(filePath));
String line;
while ((line = buff.readLine()) != null) {
ret += line;
}
buff.close();
} catch (FileNotFoundException ex) {
Logger.getLogger(Plugin.class.getName()).log(Level.SEVERE, null, ex);
} catch (IOException ex) {
Logger.getLogger(Plugin.class.getName()).log(Level.SEVERE, null, ex);
}
return ret;
}

View File

@ -1,14 +0,0 @@
String OS = System.getProperty("os.name").toLowerCase();
public static boolean isWindows() {
return (OS.indexOf("win") >= 0);
}
public static boolean isMac() {
return (OS.indexOf("mac") >= 0);
}
public static boolean isUnix() {
return (OS.indexOf("nix") >= 0 || OS.indexOf("nux") >= 0 || OS.indexOf("aix") > 0 );
}