Whenever I actually played with my Tamagotchis, I would either pause them at home or bring them to school. I'm not very knowledgeable of sleeping times so I'd rather not risk it. At school, sometimes I'd leave it in my locker with the sound off and check on it between periods. Each period lasts about 45 minutes. Alternately, I could keep it in the storage space underneath my desk in classes with the sound off, of course and check on it whenever I got the chance. If I needed to play games, I would put itin my pocket and ask to go to the bathroom, then play with it in the bathroom stall, or wait until recess and played with it when no one was looking. Or, I could just keep it in my pocket the whole time, but then the buttons could be easily pressed without my intention. But if I wanted to transport my Tamagotchi anywhere without it being seen, I would need to keep it in my pocket, and not all of my pants I wear have one. So, total failure there, unless I keep it in my binder, and that's not very convenient, carrying a big binder around, and the Tamagotchi could get squished in there.
Luckily, my school is somewhat light, and if you're caught with a Tamagotchi it'll almost never result in a trip to the principal's office. If something is confiscated it's always given back later. One time, when I was in class, I was keeping my Tamagotchi in my pocket. Somehow, the buttons pushed and the sound came on, and my Tamagotchi made a cry for attention. Everyone in my class heard it...I quickly paused it. Some of my classmates even said "You know there's a way to turn the sound off on those things?" My teacher heard it and was confused about what the sound was, but she didn't confiscate it or anything. Also, at recess, you're usually allowed to bring any toys or games in only to be used in recess.
Putting the clock screen on and telling the teacher its your watch works too, but only if you cover up the Tamagotchi Connection logo at the top somehow and even then, it doesn't give you a quick glance of how your Tamagotchi is feeling.
If I kept it at home, I would put it in a place where nothing else is. One time, my dad put down something where my Tamagotchi was and it got unpaused while I was at school. Not good. Even if I forgot to pause it, my Tamagotchi could usually live, but it greatly impacts how it will grow (usually into a Masktchi or Gozarutchi). I'm at school for 7 hours each day.