From 827d73112029fb5b5a690a6e3360402c14ef46df Mon Sep 17 00:00:00 2001 From: Doug MacEachern Date: Fri, 25 Feb 2005 01:30:57 +0000 Subject: [PATCH] turn off paging --- bindings/java/src/net/hyperic/sigar/cmd/Time.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/bindings/java/src/net/hyperic/sigar/cmd/Time.java b/bindings/java/src/net/hyperic/sigar/cmd/Time.java index 1f3a981f..ba085a9d 100644 --- a/bindings/java/src/net/hyperic/sigar/cmd/Time.java +++ b/bindings/java/src/net/hyperic/sigar/cmd/Time.java @@ -32,8 +32,15 @@ public class Time extends SigarCommandBase { long user = cpu.getUser(); long sys = cpu.getSys(); long start = System.currentTimeMillis(); + boolean isInteractive = this.shell.isInteractive(); + //turn off paging. + this.shell.setInteractive(false); - this.shell.handleCommand("time " + args[0], args); + try { + this.shell.handleCommand("time " + args[0], args); + } finally { + this.shell.setInteractive(isInteractive); + } cpu.gather(this.sigar, 0); println("real....." +