summaryrefslogtreecommitdiffhomepage
path: root/src/Xmobar/Plugins/Monitors/Top/Common.hs
diff options
context:
space:
mode:
authorMichal Zielonka <michal.zielonka.8001@gmail.com>2021-10-11 23:11:30 +0200
committerMichal Zielonka <michal.zielonka.8001@gmail.com>2021-10-16 22:55:38 +0200
commit8287e45b62d0d310512574850bad4741c4b3a53d (patch)
treef38dd0fb2fd2f31d3482fe7f2d86cfdeb1cb70db /src/Xmobar/Plugins/Monitors/Top/Common.hs
parent82127e302355ceebfc3022d63823ed5789a69f9c (diff)
downloadxmobar-8287e45b62d0d310512574850bad4741c4b3a53d.tar.gz
xmobar-8287e45b62d0d310512574850bad4741c4b3a53d.tar.bz2
add top for freebsd proc
In FreeBSD /proc/pid/stat is missing we should use for top procstat library.
Diffstat (limited to 'src/Xmobar/Plugins/Monitors/Top/Common.hs')
-rw-r--r--src/Xmobar/Plugins/Monitors/Top/Common.hs32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/Xmobar/Plugins/Monitors/Top/Common.hs b/src/Xmobar/Plugins/Monitors/Top/Common.hs
new file mode 100644
index 0000000..74b6fdd
--- /dev/null
+++ b/src/Xmobar/Plugins/Monitors/Top/Common.hs
@@ -0,0 +1,32 @@
+-----------------------------------------------------------------------------
+-- |
+-- Module : Plugins.Monitors.Top.Common
+-- Copyright : (c) 2010, 2011, 2012, 2013, 2014, 2018 Jose A Ortega Ruiz
+-- License : BSD-style (see LICENSE)
+--
+-- Maintainer : Jose A Ortega Ruiz <jao@gnu.org>
+-- Stability : unstable
+-- Portability : unportable
+--
+-- Process activity and memory consumption monitors
+--
+-----------------------------------------------------------------------------
+
+module Xmobar.Plugins.Monitors.Top.Common (
+ MemInfo
+ , Pid
+ , TimeInfo
+ , TimeEntry
+ , Times
+ , TimesRef
+ ) where
+
+import Data.IORef (IORef)
+import Data.Time.Clock (UTCTime)
+
+type MemInfo = (String, Float)
+type Pid = Int
+type TimeInfo = (String, Float)
+type TimeEntry = (Pid, TimeInfo)
+type Times = [TimeEntry]
+type TimesRef = IORef (Times, UTCTime)