1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
$NetBSD: patch-ab,v 1.1.1.1 2008/03/10 08:58:32 martti Exp $
What is this for?
--- src/mod_last.erl.orig 2008-01-16 12:33:27.000000000 +0200
+++ src/mod_last.erl 2008-02-11 13:46:13.000000000 +0200
@@ -133,7 +133,16 @@
sub_el = [{xmlelement, "query",
[{"xmlns", ?NS_LAST},
{"seconds", integer_to_list(Sec)}],
- [{xmlcdata, Status}]}]}
+ [{xmlcdata, Status}]}]};
+ [{last_activity, _, TimeStamp}] ->
+ {MegaSecs, Secs, _MicroSecs} = now(),
+ TimeStamp2 = MegaSecs * 1000000 + Secs,
+ Sec = TimeStamp2 - TimeStamp,
+ IQ#iq{type = result,
+ sub_el = [{xmlelement, "query",
+ [{"xmlns", ?NS_LAST},
+ {"seconds", integer_to_list(Sec)}],
+ []}]}
end.
|