added:
#isNotTimeslicing
#isTimeslicing
#startTimeslicing
#stopTimeslicing
changed: #mainMenu
--- a/ProcessMonitorV2.st Tue Nov 01 11:34:10 2011 +0100
+++ b/ProcessMonitorV2.st Thu Nov 03 21:28:49 2011 +0100
@@ -971,6 +971,7 @@
"Do not manually edit this!! If it is corrupted,
the MenuEditor may not be able to read the specification."
+
"
MenuEditor new openOnClass:ProcessMonitorV2 andSelector:#mainMenu
(Menu new fromLiteralArrayEncoding:(ProcessMonitorV2 mainMenu)) startUp
@@ -988,6 +989,21 @@
(Menu
(
(MenuItem
+ label: 'Start Timeslicing'
+ itemValue: startTimeslicing
+ translateLabel: true
+ isVisible: isNotTimeslicing
+ )
+ (MenuItem
+ label: 'Stop Timeslicing'
+ itemValue: stopTimeslicing
+ translateLabel: true
+ isVisible: isTimeslicing
+ )
+ (MenuItem
+ label: '-'
+ )
+ (MenuItem
label: 'Exit'
itemValue: closeRequest
translateLabel: true
@@ -1906,6 +1922,18 @@
^ currentSortOrder
!
+isNotTimeslicing
+ ^ self isTimeslicing not
+
+ "Created: / 03-11-2011 / 21:26:10 / cg"
+!
+
+isTimeslicing
+ ^ Processor isTimeSlicing
+
+ "Created: / 03-11-2011 / 21:25:53 / cg"
+!
+
processList
processList isNil ifTrue:[
@@ -2565,12 +2593,28 @@
self selectedProcessesSend:#resume
!
+startTimeslicing
+ Processor isTimeSlicing ifFalse:[
+ Processor startTimeSlicing.
+ ].
+
+ "Created: / 03-11-2011 / 21:26:27 / cg"
+!
+
stopProcess
"stop the selected process - not even interrupts will wake it up"
self selectedProcessesSend:#stop
!
+stopTimeslicing
+ Processor isTimeSlicing ifTrue:[
+ Processor stopTimeSlicing.
+ ].
+
+ "Created: / 03-11-2011 / 21:26:40 / cg"
+!
+
suspendProcess
"suspend the selected process - interrupts will let it run again"
@@ -3631,9 +3675,9 @@
!ProcessMonitorV2 class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libtool/ProcessMonitorV2.st,v 1.55 2011-08-17 13:22:29 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/ProcessMonitorV2.st,v 1.56 2011-11-03 20:28:49 cg Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libtool/ProcessMonitorV2.st,v 1.55 2011-08-17 13:22:29 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/ProcessMonitorV2.st,v 1.56 2011-11-03 20:28:49 cg Exp $'
! !