solenv/gdb/libreoffice/tl.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-)
New commits: commit df3b3f7e31a78aa8fb9228fc44a299fc4b88de9d Author: Lionel Elie Mamane <[email protected]> Date: Sun Jul 28 15:53:00 2013 +0200 Adapt gdb python pretty-printer to time nano-second precision API change Change-Id: I416d98a298f00ae445a480c738a47758544d317c Reviewed-on: https://gerrit.libreoffice.org/5150 Reviewed-by: LuboÅ¡ LuÅák <[email protected]> Tested-by: LuboÅ¡ LuÅák <[email protected]> diff --git a/solenv/gdb/libreoffice/tl.py b/solenv/gdb/libreoffice/tl.py index 71ff822..7c18a95 100644 --- a/solenv/gdb/libreoffice/tl.py +++ b/solenv/gdb/libreoffice/tl.py @@ -149,27 +149,27 @@ class DatePrinter(object): class TimeImpl(DateTimeImpl): - def __init__(self, hour, minute, second, hundreth_of_second = 0): + def __init__(self, hour, minute, second, nanosecond = 0): super(TimeImpl, self).__init__(None, self) self.hour = hour self.minute = minute self.second = second - self.hundreth_of_second = hundreth_of_second + self.nanosecond = nanosecond def __str__(self): decimal = '' - if self.hundreth_of_second != 0: - decimal = '.%d' % self.hundreth_of_second - return "%d:%d:%d%s" % (self.hour, self.minute, self.second, decimal) + if self.nanosecond != 0: + decimal = '.%09d' % self.nanosecond + return "%02d:%02d:%02d%s" % (self.hour, self.minute, self.second, decimal) @staticmethod def parse(val): time = val['nTime'] - h = time / 1000000 - m = (time / 10000) % 100 - s = (time / 100) % 100 - s_100 = time % 100 - return TimeImpl(h, m, s, s_100) + h = time / 10000000000000 + m = (time / 100000000000) % 100 + s = (time / 1000000000) % 100 + ns = time % 1000000000 + return TimeImpl(h, m, s, ns) class TimePrinter(object): '''Prints time'''
_______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
