Film Canon
----------

In the film adaptation, Hogwarts has an enormous [Clock Tower][1] in the centre of the main courtyard. It seems to chime on the hour and half-hour throughout the day

[![enter image description here][2]][2]

Book canon
----------

**They have clocks on the walls**

> The following week dragged by. Wednesday night found Hermione and
> Harry sitting alone in the common room, long after everyone else had
> gone to bed. **The clock on the wall had just chimed midnight when the
> portrait hole burst open.** Ron appeared out of nowhere as he pulled off
> Harry’s Invisibility Cloak. He had been down at Hagrid’s hut, helping
> him feed Norbert, who was now eating dead rats by the crate.<sub><sup>HP:Philosopher's Stone - Chapter 14</sub></sup>

**and upright clocks**

> ‘No, no, no,’ said Hermione. ‘No, we’re not. Why don’t you go to bed,
> Neville?’ Harry looked at the grandfather clock by the door. They
> couldn’t afford to waste any more time, Snape might even now be
> playing Fluffy to sleep. <sub><sup>HP:Philosopher's Stone - Chapter 16</sub></sup>

Presumably these clocks are *literally* clockwork, which wouldn't be affected by magic restrictions on electronics.

**Our three heroes wear wrist-watches**

 - **Ron:** 

> ***‘Nearly six,’ said Ron, checking his watch** and then staring down the
> drive which led to the front gates. ‘How d’you reckon they’re coming?
> The train?’*

 - **Harry:**   

> ***Harry crept past them to the portrait hole and waited for a minute or
> so, keeping an eye on his watch.** Then Hermione opened the Fat Lady for
> him from outside as they had planned. He slipped past her with a
> whispered ‘Thanks!’ and set off through the castle.*

 - **Hermione:** 
  
> ***Hermione was tugging at his sleeve, staring at her watch**. ‘We’ve got
> exactly ten minutes to get back down to the hospital wing without
> anybody seeing us – before Dumbledore locks the door’*

----------

For the record, there may be [magical watches][3] (Dumbledore seems to have one) but the rest of the characters seem to rely on mundane clocks and wristwatches, all of which seem to work fine inside Hogwarts:

> *Professor McGonagall pulled out a lace handkerchief and dabbed at her
> eyes beneath her spectacles. Dumbledore gave a great sniff as he took
> a golden watch from his pocket and examined it. It was a very odd
> watch. It had twelve hands but no numbers; instead, little planets
> were moving around the edge. It must have made sense to Dumbledore,
> though, because he put it back in his pocket and said, ‘Hagrid’s late.
> I suppose it was he who told you I’d be here, by the way?’*


  [1]: http://harrypotter.wikia.com/wiki/Clock_Tower
  [2]: https://i.sstatic.net/vMibs.jpg
  [3]: http://harrypotter.wikia.com/wiki/Albus_Dumbledore's_pocket_watch