projects
/
kivitendo-erp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
386994b
)
Funktion für zufällige temporäre Dateinamen (ohne gleich eine Datei zu öffnen).
author
Moritz Bunkus
<m.bunkus@linet-services.de>
Thu, 11 Jan 2007 15:31:59 +0000
(15:31 +0000)
committer
Moritz Bunkus
<m.bunkus@linet-services.de>
Thu, 11 Jan 2007 15:31:59 +0000
(15:31 +0000)
SL/Common.pm
patch
|
blob
|
history
diff --git
a/SL/Common.pm
b/SL/Common.pm
index
de1735f
..
33a6e2a
100644
(file)
--- a/
SL/Common.pm
+++ b/
SL/Common.pm
@@
-8,6
+8,17
@@
package Common;
+use Time::HiRes qw(gettimeofday);
+
+sub unique_id {
+ my ($a, $b) = gettimeofday();
+ return "${a}-${b}-${$}";
+}
+
+sub tmpname {
+ return "/tmp/lx-office-tmp-" . unique_id();
+}
+
sub retrieve_parts {
$main::lxdebug->enter_sub();