Ideally students will be focused on problem solving when they are in the computer lab. Show respect for students and their problem solving by giving them a warning before you ask them to stop working. You can count down from 5 or 10 before stopping the class. When possible give students a 5-minute warning before the end of class and a 30-second warning before an announcement. These strategies can help reduce students’ negotiations of needing to do "one more thing."
Example: "We will have monitors off in 30 seconds."
See this and related tips as a Tip Sheet: http://csteachingtips.org/tips-for-lab-rules