Skip to content

Commit

Permalink
add session start time to SASsession repr
Browse files Browse the repository at this point in the history
  • Loading branch information
tomweber-sas committed Aug 7, 2024
1 parent 847db4f commit 3061e5a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions saspy/sasbase.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
import os
import sys
import datetime
import time
import getpass
import importlib
import re
Expand Down Expand Up @@ -596,6 +597,8 @@ def __init__(self, **kwargs):
elif self.sascfg.mode == 'HTTP':
self._io = SASsessionHTTP(sascfgname=self.sascfg.name, sb=self, **kwargs)

self.sesstart = time.ctime()

# gather some session info
sysvars = "data _null_; length x $ 4096;"
if self.sascfg.mode in ['STDIO', 'SSH', '']:
Expand Down Expand Up @@ -717,6 +720,7 @@ def __repr__(self):
x += "SAS Session Encoding = %s\n" % self.sascei
x += "Python Encoding value = %s\n" % pyenc
x += "SAS process Pid value = %s\n" % self.SASpid
x += "SASsession started = %s\n" % self.sesstart
x += "\n"

return x
Expand Down

0 comments on commit 3061e5a

Please sign in to comment.