# File lib/uuid.rb, line 323
323:   def next_sequence
324:     if self.class.state_file
325:       open_lock 'rb+' do |io|
326:         @mac, @sequence, @last_clock = read_state(io)
327: 
328:         io.rewind
329:         io.truncate 0
330: 
331:         @sequence += 1
332: 
333:         write_state io
334:       end
335:     else
336:       @sequence += 1
337:     end
338:   rescue Errno::ENOENT
339:     open_lock 'w' do |io|
340:       write_state io
341:     end
342:   ensure
343:     @last_clock = (Time.now.to_f * CLOCK_MULTIPLIER).to_i
344:     @drift = 0
345:   end