I am not versed in the Bitcoin source code, but the network tries to keep Block generation at 2016 blocks per two weeks(6 per hour), due to variance this isn't possible to control entirely, but it tries. If 2016 blocks took less than two weeks, the difficulty goes up, likewise if it took longer than 2 weeks, it goes down. So the variable is used to determine that somewhere I guess.