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