loiter vs while away

loiter

verb
  • To remain at a certain place instead of moving on. 

  • To stand about without any aim or purpose; to stand about idly. 

  • For an aircraft to remain in the air near a target. 

noun
  • A standing or strolling about without any aim or purpose. 

while away

verb
  • To spend (time) idly but pleasantly 

  • To elapse, to pass. 

How often have the words loiter and while away occurred in a corpus of books? (source: Google Ngram Viewer )