From b61db412d0d913a4fcecbce6678710ad0eb76cf6 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Thu, 11 Jan 2007 15:31:59 +0000 Subject: [PATCH] =?utf8?q?Funktion=20f=C3=BCr=20zuf=C3=A4llige=20tempor?= =?utf8?q?=C3=A4re=20Dateinamen=20(ohne=20gleich=20eine=20Datei=20zu=20?= =?utf8?q?=C3=B6ffnen).?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/Common.pm | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/SL/Common.pm b/SL/Common.pm index de1735ffe..33a6e2a6a 100644 --- 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(); -- 2.20.1